From a7b313232cddee1b11645b24fe99c5764ab2461b Mon Sep 17 00:00:00 2001 From: marcomoerz Date: Thu, 4 Jul 2024 14:30:30 +0200 Subject: [PATCH] changed cmake --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dcc8b91..5850d47f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,8 @@ set(DRAMPOWER_TEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests") option(DRAMPOWER_BUILD_TESTS "Build DRAMPower unit tests" OFF) option(DRAMPOWER_VERBOSE_CMAKE_OUTPUT "Show detailed CMake output" OFF) option(DRAMPOWER_BUILD_CLI "Build DRAMPower Command Line Tool" OFF) -option(DRAMPOWER_LOCAL_DRAMUTILS "Use a local DRAMUtils installation." OFF) + +set(DRAMPOWER_LOCAL_DRAMUTILS_FOLDER "" CACHE PATH "Local DRAMUtils installation path (optional)") ### Compiler settings ### set(CMAKE_CXX_STANDARD 17) @@ -118,7 +119,7 @@ if(DRAMPOWER_BUILD_TESTS) endif() ### DRAMUtils ### -if (NOT DRAMPOWER_LOCAL_DRAMUTILS) +if (NOT DRAMPOWER_LOCAL_DRAMUTILS_FOLDER) # Fetch DRAMUtils from github FetchContent_Declare( DRAMUtils @@ -126,12 +127,11 @@ if (NOT DRAMPOWER_LOCAL_DRAMUTILS) FetchContent_MakeAvailable(DRAMUtils) set_target_properties(DRAMUtils PROPERTIES FOLDER lib) -elseif(DRAMPOWER_LOCAL_DRAMUTILS) +elseif(DRAMPOWER_LOCAL_DRAMUTILS_FOLDER) # Fetch DRAMUtils from path ../DRAMUtils - set(DRAMUtils_SOURCE_DIR_FETCH ${CMAKE_CURRENT_SOURCE_DIR}/../DRAMUtils) FetchContent_Declare( DRAMUtils - SOURCE_DIR ${DRAMUtils_SOURCE_DIR_FETCH}) + SOURCE_DIR ${DRAMPOWER_LOCAL_DRAMUTILS_FOLDER}) FetchContent_MakeAvailable(DRAMUtils) set_target_properties(DRAMUtils PROPERTIES FOLDER lib)