Minor improvements on package handling
This commit is contained in:
@@ -64,7 +64,6 @@ option(DRAMSYS_BUILD_TESTS "Build DRAMSys unit tests" OFF)
|
||||
option(DRAMSYS_BUILD_BENCHMARKS "Build DRAMSys benchmarks" OFF)
|
||||
option(DRAMSYS_BUILD_CLI "Build DRAMSys Command Line Tool" ${PROJECT_IS_TOP_LEVEL})
|
||||
option(DRAMSYS_BUILD_TRACE_ANALYZER "Build DRAMSys Trace Analyzer" OFF)
|
||||
option(DRAMSYS_WITH_DRAMPOWER "Build with DRAMPower support enabled." OFF)
|
||||
|
||||
# Use sane defaults for FetchContent:
|
||||
# In case we are the top-level project, get everything by default
|
||||
@@ -125,11 +124,12 @@ if (DRAMSYS_USE_FETCH_CONTENT)
|
||||
set_target_properties(systemc PROPERTIES SYSTEM TRUE)
|
||||
endif()
|
||||
|
||||
if (DRAMSYS_WITH_DRAMPOWER AND DRAMSYS_USE_FETCH_CONTENT_INTERNAL)
|
||||
if (DRAMSYS_USE_FETCH_CONTENT_INTERNAL)
|
||||
FetchContent_Declare(
|
||||
DRAMPower
|
||||
GIT_REPOSITORY https://github.com/tukl-msd/DRAMPower
|
||||
GIT_TAG 9e64a1b
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(DRAMPower)
|
||||
@@ -140,6 +140,14 @@ find_package(SystemCLanguage REQUIRED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
|
||||
find_package(DRAMPower)
|
||||
|
||||
if (DRAMPower_FOUND)
|
||||
message(STATUS "Building with DRAMPower")
|
||||
else()
|
||||
message(STATUS "Building without DRAMPower")
|
||||
endif()
|
||||
|
||||
###############################################
|
||||
### Source Directory ###
|
||||
###############################################
|
||||
|
||||
Reference in New Issue
Block a user