diff --git a/DRAMSys/gem5/CMakeLists.txt b/DRAMSys/gem5/CMakeLists.txt index 82952634..6485e4f1 100644 --- a/DRAMSys/gem5/CMakeLists.txt +++ b/DRAMSys/gem5/CMakeLists.txt @@ -68,7 +68,6 @@ target_include_directories(DRAMSys_gem5 ) target_link_libraries(DRAMSys_gem5 - ${SYSTEMC_LIBRARY} - DRAMSysLibrary - ${GEM5_LIBRARY} + PRIVATE DRAMSysLibrary + PRIVATE ${GEM5_LIBRARY} ) diff --git a/DRAMSys/library/CMakeLists.txt b/DRAMSys/library/CMakeLists.txt index d8328dea..0b828857 100644 --- a/DRAMSys/library/CMakeLists.txt +++ b/DRAMSys/library/CMakeLists.txt @@ -39,11 +39,6 @@ project(DRAMSysLibrary) set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version") set(DCMAKE_SH="CMAKE_SH-NOTFOUND") -# Add sqlite3 Dependency: -set(BUILD_ENABLE_RTREE ON CACHE BOOL "Enable R-Tree Feature") -set(BUILD_ENABLE_RTREE ON) -add_subdirectory(src/common/third_party/sqlite-amalgamation) - # Add DRAMPower: add_subdirectory(src/common/third_party/DRAMPower) @@ -65,11 +60,17 @@ else() endif() if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/src/simulation/DRAMSysRecordable.cpp) + # Add sqlite3 Dependency: + set(BUILD_ENABLE_RTREE ON CACHE BOOL "Enable R-Tree Feature") + set(BUILD_ENABLE_RTREE ON) + add_subdirectory(src/common/third_party/sqlite-amalgamation) + set(RECORDING_SOURCES src/common/TlmRecorder.cpp src/controller/ControllerRecordable.cpp src/simulation/DRAMSysRecordable.cpp - src/simulation/dram/DramRecordable.cpp) + src/simulation/dram/DramRecordable.cpp + ) endif() add_library(DRAMSysLibrary @@ -282,25 +283,31 @@ if(DEFINED ENV{LIBTHREED_ICE_HOME} AND DEFINED ENV{LIBSUPERLU_HOME}) message("-- 3D-ICE and SuperLU available") add_definitions(-DTHERMALSIM) target_include_directories(DRAMSysLibrary - PUBLIC $ENV{LIBTHREED_ICE_HOME}/include/ + PRIVATE $ENV{LIBTHREED_ICE_HOME}/include/ ) find_library(3DICE_LIBRARY NAMES threed-ice-2.2.4 PATHS $ENV{LIBTHREED_ICE_HOME}/lib/) target_link_libraries(DRAMSysLibrary - ${3DICE_LIBRARY} + PRIVATE ${3DICE_LIBRARY} + ) +endif() + +if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/src/simulation/DRAMSysRecordable.cpp) + target_include_directories(DRAMSysLibrary + PRIVATE src/common/third_party/sqlite-amalgamation/ + ) + target_link_libraries(DRAMSysLibrary + PRIVATE sqlite3::sqlite3 ) endif() # Build: target_include_directories(DRAMSysLibrary PUBLIC src/common/third_party/DRAMPower/src/ - PUBLIC src/common/third_party/sqlite-amalgamation/ PUBLIC $ENV{SYSTEMC_HOME}/include/ PUBLIC $ENV{SYSTEMC_HOME}/include/tlm/ ) target_link_libraries(DRAMSysLibrary - ${SYSTEMC_LIBRARY} - sqlite3::sqlite3 - DRAMPower + PUBLIC ${SYSTEMC_LIBRARY} + PRIVATE DRAMPower ) - diff --git a/DRAMSys/simulator/CMakeLists.txt b/DRAMSys/simulator/CMakeLists.txt index b2e88476..23c68f3a 100644 --- a/DRAMSys/simulator/CMakeLists.txt +++ b/DRAMSys/simulator/CMakeLists.txt @@ -57,7 +57,6 @@ target_include_directories(DRAMSys PUBLIC ../library/src/ ) -target_link_libraries(DRAMSys - ${SYSTEMC_LIBRARY} - DRAMSysLibrary +target_link_libraries(DRAMSys + PRIVATE DRAMSysLibrary ) diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index 7b2261c5..00a70740 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -57,18 +57,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_CXX_STANDARD 11) set(DCMAKE_SH="CMAKE_SH-NOTFOUND") -include_directories( - ${QWT_INCLUDE_DIRS} - ${Python3_INCLUDE_DIRS} - ./ - businessObjects/ - businessObjects/phases/ - data/ - presentation/ - presentation/util/ -) - - add_executable(TraceAnalyzer main.cpp businessObjects/transaction.cpp @@ -116,9 +104,15 @@ add_executable(TraceAnalyzer scripts/dataExtractForNN.pl ) +target_include_directories(TraceAnalyzer + PRIVATE ${QWT_INCLUDE_DIRS} + PRIVATE ${Python3_INCLUDE_DIRS} +) + # Build: target_link_libraries(TraceAnalyzer - ${Python3_LIBRARIES} - ${QWT_LIBRARY} + PRIVATE ${Python3_LIBRARIES} + PRIVATE ${QWT_LIBRARY} + PRIVATE Qt5::Widgets + PRIVATE Qt5::Sql ) -qt5_use_modules(TraceAnalyzer Widgets Sql)