diff --git a/CMakeLists.txt b/CMakeLists.txt index cf688c9..6808ec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.28) project(ArgumentManagerProject VERSION 1.0 LANGUAGES CXX) diff --git a/cmake/FetchNlohmannJson.cmake b/cmake/FetchNlohmannJson.cmake index 850fd43..45f94a6 100644 --- a/cmake/FetchNlohmannJson.cmake +++ b/cmake/FetchNlohmannJson.cmake @@ -4,10 +4,7 @@ FetchContent_Declare( json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz DOWNLOAD_EXTRACT_TIMESTAMP FALSE + EXCLUDE_FROM_ALL ) -FetchContent_GetProperties(json) -if(NOT json_POPULATED) - FetchContent_Populate(json) - add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL) -endif() +FetchContent_MakeAvailable(json) diff --git a/cmake/httpLib.cmake b/cmake/httpLib.cmake index f799356..0ba0495 100644 --- a/cmake/httpLib.cmake +++ b/cmake/httpLib.cmake @@ -4,10 +4,7 @@ FetchContent_Declare( cpp_httplib GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git GIT_TAG v0.14.3 + EXCLUDE_FROM_ALL ) -FetchContent_GetProperties(cpp_httplib) -if(NOT cpp_httplib_POPULATED) - FetchContent_Populate(cpp_httplib) - add_subdirectory(${cpp_httplib_SOURCE_DIR} ${cpp_httplib_BINARY_DIR} EXCLUDE_FROM_ALL) -endif() +FetchContent_MakeAvailable(cpp_httplib) diff --git a/cmake/logger/coretraceLog.cmake b/cmake/logger/coretraceLog.cmake index f0d1b91..9425d74 100644 --- a/cmake/logger/coretraceLog.cmake +++ b/cmake/logger/coretraceLog.cmake @@ -6,9 +6,6 @@ include(FetchContent) FetchContent_Declare(coretrace-logger GIT_REPOSITORY https://github.com/CoreTrace/coretrace-log.git GIT_TAG main + EXCLUDE_FROM_ALL ) -FetchContent_GetProperties(coretrace-logger) -if(NOT coretrace-logger_POPULATED) - FetchContent_Populate(coretrace-logger) - add_subdirectory(${coretrace-logger_SOURCE_DIR} ${coretrace-logger_BINARY_DIR} EXCLUDE_FROM_ALL) -endif() +FetchContent_MakeAvailable(coretrace-logger) diff --git a/cmake/stackUsageAnalyzer.cmake b/cmake/stackUsageAnalyzer.cmake index 48c703f..0b27429 100644 --- a/cmake/stackUsageAnalyzer.cmake +++ b/cmake/stackUsageAnalyzer.cmake @@ -4,13 +4,10 @@ FetchContent_Declare( stack_analyzer GIT_REPOSITORY https://github.com/CoreTrace/coretrace-stack-analyzer.git GIT_TAG v0.17.0 + EXCLUDE_FROM_ALL ) -FetchContent_GetProperties(stack_analyzer) -if(NOT stack_analyzer_POPULATED) - FetchContent_Populate(stack_analyzer) - add_subdirectory(${stack_analyzer_SOURCE_DIR} ${stack_analyzer_BINARY_DIR} EXCLUDE_FROM_ALL) -endif() +FetchContent_MakeAvailable(stack_analyzer) # Copy upstream default models into config/models/ so that tool-config.json # can reference them with paths relative to the config directory, without