Skip to content

Commit

Permalink
Update CMake policy (celeritas-project#1563)
Browse files Browse the repository at this point in the history
`DEPENDS` is not allowed with the `TARGET` usage of add_custom_command.
  • Loading branch information
sethrj committed Jan 14, 2025
1 parent ff1aeb5 commit 65e6950
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#----------------------------------------------------------------------------#

cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.18...3.31)

# Set Celeritas_VERSION using git tags using the following format
set(CGV_TAG_REGEX "v([0-9.]+)(-dev|-rc.[0-9]+)?")
Expand All @@ -15,7 +15,6 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE
"${CMAKE_CURRENT_LIST_DIR}/cmake/CeleritasMakeRulesOverride.cmake")

project(Celeritas VERSION "${Celeritas_VERSION}" LANGUAGES CXX)
cmake_policy(VERSION 3.18...3.28)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ Geant4:
- 11.1-11.3: [no support for default Rayleigh scattering cross section](see
https://github.com/celeritas-project/celeritas/issues/1091)

Note also that navigation bugs in older versions of Geant4 and VecGeom can
cause test failures in Celeritas.
Note also that navigation bugs in Geant4 and VecGeom older than the versions
listed above *will* cause failures in some geometry-related unit tests. Future
behavior changes in external packages may also cause failures.

Since we compile with extra warning flags and avoid non-portable code, most
other compilers *should* work.
Expand Down
5 changes: 0 additions & 5 deletions test/celeritas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,6 @@ if(CELERITAS_USE_Geant4 AND CELERITAS_USE_ROOT)
add_custom_command(
TARGET update-root-test-data
POST_BUILD
DEPENDS
celer-export-geant
"${_gdml}"
"${_basename}.geant.json"
"${PROJECT_SOURCE_DIR}/src/celeritas/ext/RootInterfaceLinkDef.h"
COMMAND
"${CMAKE_COMMAND}" "-E" "env" ${CELER_G4ENV}
"$<TARGET_FILE:celer-export-geant>"
Expand Down

0 comments on commit 65e6950

Please sign in to comment.