From 10c476147e82846066ba72715583a35e2098f718 Mon Sep 17 00:00:00 2001 From: Florian Fontan Date: Sat, 27 Apr 2024 18:11:10 +0200 Subject: [PATCH] Add EXCLUDE_FROM_ALL flag to FetchContent --- extern/CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 86a0f2a..8888333 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -6,17 +6,18 @@ set(BOOST_INCLUDE_LIBRARIES thread filesystem system program_options) set(BOOST_ENABLE_CMAKE ON) include(FetchContent) FetchContent_Declare( - Boost - GIT_REPOSITORY https://github.com/boostorg/boost.git - GIT_TAG boost-1.84.0 - GIT_SHALLOW TRUE -) + Boost + GIT_REPOSITORY https://github.com/boostorg/boost.git + GIT_TAG boost-1.84.0 + GIT_SHALLOW TRUE + EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(Boost) # Fetch fontanf/optimizationtools. FetchContent_Declare( optimizationtools GIT_REPOSITORY https://github.com/fontanf/optimizationtools.git - GIT_TAG 33a3966ece149d390ec7ce08699669b5267e64aa) - #SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/") + GIT_TAG 33a3966ece149d390ec7ce08699669b5267e64aa + #SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/" + EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(optimizationtools)