Skip to content

Commit

Permalink
Avoid building additional celeritas targets for cmake < 3.28 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj authored Feb 20, 2024
1 parent 5164c81 commit d511171
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit d511171

Please sign in to comment.