From d511171ea9e8add3cc417aff45501a7ebbe2e698 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Tue, 20 Feb 2024 06:32:44 -0500 Subject: [PATCH] Avoid building additional celeritas targets for cmake < 3.28 (#5) --- external/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index e8b5fa8..8f43ee8 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -9,7 +9,7 @@ include(FetchContent) # Load Celeritas FetchContent_Declare( Celeritas - EXCLUDE_FROM_ALL + EXCLUDE_FROM_ALL # see below... URL https://github.com/celeritas-project/celeritas/archive/0f74ea935d72bed23b82fad98402bc68dd606d94.zip ) @@ -43,6 +43,11 @@ g4vg_set_default(CELERITAS_REAL_TYPE double) g4vg_set_default(BUILD_SHARED_LIBS OFF) g4vg_set_default(CMAKE_POSITION_INDEPENDENT_CODE ON) +if(CMAKE_VERSION VERSION_LESS 3.28) + # See https://gitlab.kitware.com/cmake/cmake/-/issues/20167 + set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL YES) +endif() + # Load Celeritas FetchContent_MakeAvailable(Celeritas)