diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 28877e10e2f..36348dd8f00 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -24,7 +24,7 @@ env: jobs: linux_ubuntu: runs-on: ubuntu-latest - container: ghcr.io/acts-project/ubuntu2404:53 + container: ghcr.io/acts-project/ubuntu2404:57 env: INSTALL_DIR: ${{ github.workspace }}/install ACTS_LOG_FAILURE_THRESHOLD: WARNING @@ -109,7 +109,7 @@ jobs: linux_examples_test: runs-on: ubuntu-latest - container: ghcr.io/acts-project/ubuntu2404:53 + container: ghcr.io/acts-project/ubuntu2404:57 needs: [linux_ubuntu] env: ACTS_SEQUENCER_DISABLE_FPEMON: true @@ -146,7 +146,7 @@ jobs: linux_physmon: runs-on: ubuntu-latest - container: ghcr.io/acts-project/ubuntu2404:53 + container: ghcr.io/acts-project/ubuntu2404:57 needs: [linux_ubuntu] env: ACTS_SEQUENCER_DISABLE_FPEMON: true @@ -233,7 +233,7 @@ jobs: std: 20 - image: ubuntu2204_clang std: 20 - container: ghcr.io/acts-project/${{ matrix.image }}:53 + container: ghcr.io/acts-project/${{ matrix.image }}:57 env: INSTALL_DIR: ${{ github.workspace }}/install ACTS_LOG_FAILURE_THRESHOLD: WARNING @@ -310,7 +310,7 @@ jobs: INSTALL_DIR: ${{ github.workspace }}/install_acts DEPENDENCY_DIR: ${{ github.workspace }}/install ACTS_LOG_FAILURE_THRESHOLD: WARNING - DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/macOS/cmake/deps.8a95213.tar.zst + DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/macos-14/deps.v2.tar.zst # Works around an issue where root's RPATH is wrong for tbb, thus won't find it DYLD_LIBRARY_PATH: "${{ github.workspace }}/install/tbb/2021.11.0/lib" steps: @@ -341,9 +341,6 @@ jobs: ${{ runner.os }}-ccache_${{ env.CCACHE_KEY_SUFFIX }}_ - name: Configure - # setting CMAKE_CXX_STANDARD=20 is a workaround for a bug in the - # dd4hep CMake configuration that gets triggered on recent CMake - # versions such as the one installed via homebrew run: > ccache -z && PATH="${{ env.DEPENDENCY_DIR }}/bin:$PATH" @@ -352,7 +349,8 @@ jobs: -DCMAKE_PREFIX_PATH="${{ env.DEPENDENCY_DIR }}" -DPython_EXECUTABLE=${{ env.DEPENDENCY_DIR }}/bin/python3 -DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" - -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=OFF + -DACTS_BUILD_PLUGIN_GEOMODEL=ON + -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON - name: Build run: cmake --build build - name: ccache stats diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c8dea9ff2a2..fba0c29cca0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ variables: clang_tidy: stage: build - image: ghcr.io/acts-project/ubuntu2404:53 + image: ghcr.io/acts-project/ubuntu2404:57 tags: - large artifacts: @@ -152,7 +152,7 @@ build_exatrkx: build_linux_ubuntu: stage: build - image: ghcr.io/acts-project/ubuntu2404:53 + image: ghcr.io/acts-project/ubuntu2404:57 cache: key: ccache-${CI_JOB_NAME_SLUG}-${HEAD_REF}-${CCACHE_KEY_SUFFIX} @@ -191,7 +191,7 @@ build_linux_ubuntu: linux_test_examples: stage: test - image: ghcr.io/acts-project/ubuntu2404:53 + image: ghcr.io/acts-project/ubuntu2404:57 needs: [build_linux_ubuntu] script: @@ -212,7 +212,7 @@ linux_test_examples: linux_physmon: stage: test - image: ghcr.io/acts-project/ubuntu2404:53 + image: ghcr.io/acts-project/ubuntu2404:57 needs: [build_linux_ubuntu] artifacts: @@ -299,7 +299,7 @@ linux_ubuntu_2404: <<: *linux_ubuntu_extra variables: CXXSTD: 20 - image: ghcr.io/acts-project/ubuntu2404:53 + image: ghcr.io/acts-project/ubuntu2404:57 linux_ubuntu_2204_clang: <<: *linux_ubuntu_extra @@ -313,7 +313,7 @@ linux_ubuntu_2204_clang: ###################### .lcg: &lcg_base_job - image: ghcr.io/acts-project/${OS}-base:53 + image: ghcr.io/acts-project/${OS}-base:57 stage: build tags: - cvmfs diff --git a/CMakeLists.txt b/CMakeLists.txt index f8e8a93ae5b..ef661b4cf74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,7 +196,7 @@ set(_acts_autodiff_version 0.6) set(_acts_boost_version 1.71.0) set(_acts_dd4hep_version 1.21) set(_acts_edm4hep_version 0.7) -set(_acts_geomodel_version 4.6.0) +set(_acts_geomodel_version 6.3.0) set(_acts_eigen3_version 3.3.7) set(_acts_podio_version 1.0.1) # will try this first set(_acts_podio_fallback_version 0.16) # if not found, will try this one @@ -312,12 +312,8 @@ if(ACTS_BUILD_PLUGIN_JSON) endif() endif() if(ACTS_BUILD_PLUGIN_GEOMODEL) - if(ACTS_USE_SYSTEM_GEOMODEL) - find_package(GeoModelCore ${_acts_geomodel_version} REQUIRED CONFIG) - find_package(GeoModelIO ${_acts_geomodel_version} REQUIRED CONFIG) - else() - add_subdirectory(thirdparty/GeoModel) - endif() + find_package(GeoModelCore ${_acts_geomodel_version} REQUIRED CONFIG) + find_package(GeoModelIO ${_acts_geomodel_version} REQUIRED CONFIG) endif() if(ACTS_BUILD_PLUGIN_TGEO) find_package(ROOT ${_acts_root_version} REQUIRED CONFIG COMPONENTS Geom Graf) diff --git a/Examples/Algorithms/Geant4/CMakeLists.txt b/Examples/Algorithms/Geant4/CMakeLists.txt index 41b23ce1a63..efa5d2280b7 100644 --- a/Examples/Algorithms/Geant4/CMakeLists.txt +++ b/Examples/Algorithms/Geant4/CMakeLists.txt @@ -1,4 +1,5 @@ -set(ACTS_EXAMPLES_G4SOURCES +add_library( + ActsExamplesGeant4 SHARED src/GdmlDetectorConstruction.cpp src/TelescopeG4DetectorConstruction.cpp src/Geant4Simulation.cpp @@ -14,16 +15,6 @@ set(ACTS_EXAMPLES_G4SOURCES src/PhysicsListFactory.cpp src/Geant4Manager.cpp) -if (ACTS_BUILD_EXAMPLES_DD4HEP) - list(APPEND ACTS_EXAMPLES_G4SOURCES src/DDG4DetectorConstruction.cpp) -endif() - -if (ACTS_BUILD_PLUGIN_GEOMODEL) - list(APPEND ACTS_EXAMPLES_G4SOURCES src/GeoModelDetectorConstruction.cpp) -endif() - -add_library( - ActsExamplesGeant4 SHARED ${ACTS_EXAMPLES_G4SOURCES}) target_compile_definitions( ActsExamplesGeant4 PUBLIC ${Geant4_DEFINITIONS}) @@ -50,12 +41,19 @@ if (ACTS_BUILD_EXAMPLES_DD4HEP) ActsExamplesGeant4 PUBLIC ActsExamplesDetectorDD4hep DD4hep::DDCore DD4hep::DDG4) endif() + + target_sources(ActsExamplesGeant4 PUBLIC src/DDG4DetectorConstruction.cpp) endif() if (ACTS_BUILD_PLUGIN_GEOMODEL) + + target_sources(ActsExamplesGeant4 PUBLIC src/GeoModelDetectorConstruction.cpp) + + find_library(GeoModel2G4_LIBRARY GeoModel2G4 REQUIRED) + target_link_libraries( ActsExamplesGeant4 - PUBLIC ActsPluginGeoModel GeoModel2G4) + PUBLIC ActsPluginGeoModel ${GeoModel2G4_LIBRARY}) endif() install( diff --git a/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp b/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp index 36e23411f07..38bfef2ef8e 100644 --- a/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp +++ b/Examples/Algorithms/Geant4/include/ActsExamples/GeoModelG4/GeoModelDetectorConstruction.hpp @@ -8,9 +8,9 @@ #pragma once +#include "Acts/Plugins/GeoModel/GeoModelTree.hpp" #include "ActsExamples/Geant4/DetectorConstructionFactory.hpp" #include "ActsExamples/Geant4/RegionCreator.hpp" -#include #include diff --git a/Plugins/GeoModel/CMakeLists.txt b/Plugins/GeoModel/CMakeLists.txt index 90023ea01ce..eda838bac65 100644 --- a/Plugins/GeoModel/CMakeLists.txt +++ b/Plugins/GeoModel/CMakeLists.txt @@ -22,7 +22,7 @@ target_include_directories( $) target_link_libraries( ActsPluginGeoModel - PUBLIC ActsCore GeoModelKernel GeoModelIO::GeoModelDBManager GeoModelIO::GeoModelRead) + PUBLIC ActsCore GeoModelCore::GeoModelKernel GeoModelIO::GeoModelDBManager GeoModelIO::GeoModelRead) install( TARGETS ActsPluginGeoModel diff --git a/Plugins/GeoModel/include/Acts/Plugins/GeoModel/GeoModelTree.hpp b/Plugins/GeoModel/include/Acts/Plugins/GeoModel/GeoModelTree.hpp index 224e0f786ed..838018d64b1 100644 --- a/Plugins/GeoModel/include/Acts/Plugins/GeoModel/GeoModelTree.hpp +++ b/Plugins/GeoModel/include/Acts/Plugins/GeoModel/GeoModelTree.hpp @@ -18,7 +18,8 @@ namespace Acts { struct GeoModelTree { std::shared_ptr geoReader = nullptr; - GeoVPhysVol* worldVolume = nullptr; + PVConstLink worldVolume = nullptr; std::string worldVolumeName = "World"; }; + } // namespace Acts diff --git a/Plugins/GeoModel/src/GeoModelBlueprintCreater.cpp b/Plugins/GeoModel/src/GeoModelBlueprintCreater.cpp index 3f12c01037d..7495f8cca39 100644 --- a/Plugins/GeoModel/src/GeoModelBlueprintCreater.cpp +++ b/Plugins/GeoModel/src/GeoModelBlueprintCreater.cpp @@ -40,7 +40,8 @@ Acts::GeoModelBlueprintCreater::create(const GeometryContext& gctx, "GeoModelBlueprintCreater: GeoModelTree has no GeoModelReader"); } - auto blueprintTable = gmTree.geoReader->getTableFromTableName(options.table); + auto blueprintTable = + gmTree.geoReader->getTableFromTableName_String(options.table); // Prepare the map std::map blueprintTableMap; diff --git a/Tests/UnitTests/Plugins/GeoModel/GeoBoxConverterTests.cpp b/Tests/UnitTests/Plugins/GeoModel/GeoBoxConverterTests.cpp index 0e9ed440ff2..8c899c9107a 100644 --- a/Tests/UnitTests/Plugins/GeoModel/GeoBoxConverterTests.cpp +++ b/Tests/UnitTests/Plugins/GeoModel/GeoBoxConverterTests.cpp @@ -23,6 +23,8 @@ #include #include +#include "GeoModelKernel/GeoVPhysVol.h" + Acts::GeometryContext tContext; Acts::RotationMatrix3 idRotation = Acts::RotationMatrix3::Identity(); Acts::Transform3 idTransform = Acts::Transform3::Identity(); @@ -37,7 +39,7 @@ BOOST_AUTO_TEST_CASE(GeoBoxToSensitiveConversion) { // (BOX object) - XY auto boxXY = new GeoBox(100, 200, 2); auto logXY = new GeoLogVol("LogVolumeXY", boxXY, material); - auto fphysXY = new GeoFullPhysVol(logXY); + auto fphysXY = make_intrusive(logXY); auto converted = Acts::GeoBoxConverter{}.toSensitiveSurface(*fphysXY); @@ -61,7 +63,7 @@ BOOST_AUTO_TEST_CASE(GeoBoxToSensitiveConversion) { // (BOX object) - YZ auto boxYZ = new GeoBox(2, 200, 300); auto logYZ = new GeoLogVol("LogVolumeYZ", boxYZ, material); - auto fphysYZ = new GeoFullPhysVol(logYZ); + auto fphysYZ = make_intrusive(logYZ); converted = Acts::GeoBoxConverter{}.toSensitiveSurface(*fphysYZ); @@ -87,7 +89,7 @@ BOOST_AUTO_TEST_CASE(GeoBoxToSensitiveConversion) { // (BOX object) - XZ auto boxXZ = new GeoBox(400, 2, 300); auto logXZ = new GeoLogVol("LogVolumeXZ", boxXZ, material); - auto fphysXZ = new GeoFullPhysVol(logXZ); + auto fphysXZ = make_intrusive(logXZ); converted = Acts::GeoBoxConverter{}.toSensitiveSurface(*fphysXZ); diff --git a/Tests/UnitTests/Plugins/GeoModel/GeoTrdConverterTests.cpp b/Tests/UnitTests/Plugins/GeoModel/GeoTrdConverterTests.cpp index 27a5727fb77..3fc413a2881 100644 --- a/Tests/UnitTests/Plugins/GeoModel/GeoTrdConverterTests.cpp +++ b/Tests/UnitTests/Plugins/GeoModel/GeoTrdConverterTests.cpp @@ -36,7 +36,7 @@ BOOST_AUTO_TEST_CASE(GeoTrfToSensitiveConversion) { // double YHalfLength2, double ZHalfLength); auto trapYZ = new GeoTrd(2, 2, 50, 80, 60); auto logYZ = new GeoLogVol("LogVolumeYZ", trapYZ, material); - auto fphysYZ = new GeoFullPhysVol(logYZ); + auto fphysYZ = make_intrusive(logYZ); auto converted = Acts::GeoTrdConverter{}.toSensitiveSurface(*fphysYZ); @@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(GeoTrfToSensitiveConversion) { // double YHalfLength2, double ZHalfLength); auto trapYZs = new GeoTrd(2, 2, 80, 50, 60); auto logYZs = new GeoLogVol("LogVolumeYZs", trapYZs, material); - auto fphysYZs = new GeoFullPhysVol(logYZs); + auto fphysYZs = make_intrusive(logYZs); converted = Acts::GeoTrdConverter{}.toSensitiveSurface(*fphysYZs); @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(GeoTrfToSensitiveConversion) { // (Trapezoid object) - XZ auto trapXZ = new GeoTrd(50, 80, 2, 2, 60); auto logXZ = new GeoLogVol("LogVolumeXZ", trapXZ, material); - auto fphysXZ = new GeoFullPhysVol(logXZ); + auto fphysXZ = make_intrusive(logXZ); converted = Acts::GeoTrdConverter{}.toSensitiveSurface(*fphysXZ); @@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE(GeoTrfToSensitiveConversion) { // (Trapezoid object) - XZs (swapped) auto trapXZs = new GeoTrd(80, 50, 2, 2, 60); auto logXZs = new GeoLogVol("LogVolumeXZs", trapXZs, material); - auto fphysXZs = new GeoFullPhysVol(logXZs); + auto fphysXZs = make_intrusive(logXZs); converted = Acts::GeoTrdConverter{}.toSensitiveSurface(*fphysXZs); @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(GeoTrfToSensitiveConversion) { // Double - trazoid -> throw exception auto trapDouble = new GeoTrd(50, 80, 50, 80, 60); auto logDouble = new GeoLogVol("LogVolumeDouble", trapDouble, material); - auto fphysDouble = new GeoFullPhysVol(logDouble); + auto fphysDouble = make_intrusive(logDouble); BOOST_CHECK_THROW(Acts::GeoTrdConverter{}.toSensitiveSurface(*fphysDouble), std::invalid_argument); diff --git a/cmake/ActsExternSources.cmake b/cmake/ActsExternSources.cmake index 4e5fc927cb1..f37387cef8b 100644 --- a/cmake/ActsExternSources.cmake +++ b/cmake/ActsExternSources.cmake @@ -26,10 +26,6 @@ set( ACTS_FRNN_SOURCE "GIT_REPOSITORY;https://github.com/hrzhao76/FRNN/;GIT_TAG;5f8a48b0022300cd2863119f5646a5f31373e0c8" CACHE STRING "Source to take FRNN from") mark_as_advanced( ACTS_FRNN_SOURCE ) -set( ACTS_GEOMODEL_SOURCE - "GIT_REPOSITORY;https://gitlab.cern.ch/GeoModelDev/GeoModel;GIT_TAG;4.6.0;" CACHE STRING "Source to take GeoModel from") -mark_as_advanced( ACTS_GEOMODEL_SOURCE ) - set( ACTS_NLOHMANNJSON_SOURCE "URL;https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz;URL_HASH;SHA1=8969f5ad1a422e01f040ff48dcae9c0e6ad0811d" CACHE STRING "Source to take nlohmann_json from") mark_as_advanced( ACTS_NLOHMANN_JSON_SOURCE ) diff --git a/thirdparty/GeoModel/0001-Add-option-to-skip-setting-up-json-completely.patch b/thirdparty/GeoModel/0001-Add-option-to-skip-setting-up-json-completely.patch deleted file mode 100644 index 791243e8ccc..00000000000 --- a/thirdparty/GeoModel/0001-Add-option-to-skip-setting-up-json-completely.patch +++ /dev/null @@ -1,117 +0,0 @@ -From dec8e912948cac74e5362ebc3b89f34e07ecd8e8 Mon Sep 17 00:00:00 2001 -From: Paul Gessinger -Date: Wed, 28 Feb 2024 11:17:47 +0100 -Subject: [PATCH] Add option to skip setting up json completely - ---- - cmake/SetupJSON.cmake | 94 +++++++++++++++++++++++-------------------- - 1 file changed, 51 insertions(+), 43 deletions(-) - -diff --git a/cmake/SetupJSON.cmake b/cmake/SetupJSON.cmake -index 6eb203ec..41e4a1ed 100644 ---- a/cmake/SetupJSON.cmake -+++ b/cmake/SetupJSON.cmake -@@ -10,50 +10,58 @@ include_guard(GLOBAL) - - # Configuration option for how "nlohmann_json" should be used. - option(GEOMODEL_USE_BUILTIN_JSON "Download and compile a version of nlohmann_json during the build" OFF) -+option(GEOMODEL_SETUP_JSON "Whether to set up nlohmann_json at all, or expect the target to be present" ON) - --# Now do what was requested. --if(GEOMODEL_USE_BUILTIN_JSON) -- # Tell the user what's happening. -- message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_JSON' was set to 'true' ==> Building nlohmann_json as part of the project${ColourReset}" ) -- -- # The include directory and library that will be produced. -- set(nlohmann_json_INCLUDE_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall/${CMAKE_INSTALL_INCLUDEDIR}" ) -- set(nlohmann_json_INCLUDE_DIRS "${nlohmann_json_INCLUDE_DIR}" ) -- set(nlohmann_json_VERSION "3.6.1" ) -- set(nlohmann_json_FOUND TRUE ) -- message(STATUS "Installing the built-in 'nlohmann_json' in: ${nlohmann_json_INCLUDE_DIR}") -- -- # Create the include directory already, otherwise CMake refuses to -- # create the imported target. -- file(MAKE_DIRECTORY "${nlohmann_json_INCLUDE_DIR}") -- -- # Build/install nlohmann_json using ExternalProject_Add(...). -- include( ExternalProject ) -- ExternalProject_Add(JSONExt -- PREFIX ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONBuild -- INSTALL_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall -- URL "https://cern.ch/lcgpackages/tarFiles/sources/json-${nlohmann_json_VERSION}.tar.gz" -- URL_MD5 "c53592d55e7fec787cf0a406d36098a3" -- CMAKE_CACHE_ARGS -- -DCMAKE_INSTALL_PREFIX:PATH= -- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -- -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} -- -DJSON_BuildTests:BOOL=OFF -- -DJSON_MultipleHeaders:BOOL=ON -- BUILD_BYPRODUCTS "${nlohmann_json_INCLUDE_DIR}" ) -- install(DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall/ -- DESTINATION . -- COMPONENT Development -- USE_SOURCE_PERMISSIONS) -- -- # Set up nlohmann_json's imported target. -- add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED) -- set_property(TARGET nlohmann_json::nlohmann_json PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${nlohmann_json_INCLUDE_DIR}") -- -- # Auto handle dependency -- add_dependencies(nlohmann_json::nlohmann_json JSONExt) -+if(GEOMODEL_SETUP_JSON) -+ message( STATUS "${BoldMagenta}'GEOMODEL_SETUP_JSON' was set to 'true' ==> Explicitly setting up nlohmann_json${ColourReset}" ) -+ # Now do what was requested. -+ if(GEOMODEL_USE_BUILTIN_JSON) -+ # Tell the user what's happening. -+ message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_JSON' was set to 'true' ==> Building nlohmann_json as part of the project${ColourReset}" ) - -+ # The include directory and library that will be produced. -+ set(nlohmann_json_INCLUDE_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall/${CMAKE_INSTALL_INCLUDEDIR}" ) -+ set(nlohmann_json_INCLUDE_DIRS "${nlohmann_json_INCLUDE_DIR}" ) -+ set(nlohmann_json_VERSION "3.6.1" ) -+ set(nlohmann_json_FOUND TRUE ) -+ message(STATUS "Installing the built-in 'nlohmann_json' in: ${nlohmann_json_INCLUDE_DIR}") -+ -+ # Create the include directory already, otherwise CMake refuses to -+ # create the imported target. -+ file(MAKE_DIRECTORY "${nlohmann_json_INCLUDE_DIR}") -+ -+ # Build/install nlohmann_json using ExternalProject_Add(...). -+ include( ExternalProject ) -+ ExternalProject_Add(JSONExt -+ PREFIX ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONBuild -+ INSTALL_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall -+ URL "https://cern.ch/lcgpackages/tarFiles/sources/json-${nlohmann_json_VERSION}.tar.gz" -+ URL_MD5 "c53592d55e7fec787cf0a406d36098a3" -+ CMAKE_CACHE_ARGS -+ -DCMAKE_INSTALL_PREFIX:PATH= -+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -+ -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} -+ -DJSON_BuildTests:BOOL=OFF -+ -DJSON_MultipleHeaders:BOOL=ON -+ BUILD_BYPRODUCTS "${nlohmann_json_INCLUDE_DIR}" ) -+ install(DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JSONInstall/ -+ DESTINATION . -+ COMPONENT Development -+ USE_SOURCE_PERMISSIONS) -+ -+ # Set up nlohmann_json's imported target. -+ add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED) -+ set_property(TARGET nlohmann_json::nlohmann_json PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${nlohmann_json_INCLUDE_DIR}") -+ -+ # Auto handle dependency -+ add_dependencies(nlohmann_json::nlohmann_json JSONExt) -+ -+ else() -+ # Find an existing installation of nlohmann_json. -+ find_package(nlohmann_json REQUIRED) -+ endif() - else() -- # Find an existing installation of nlohmann_json. -- find_package(nlohmann_json REQUIRED) -+ if(NOT TARGET nlohmann_json::nlohmann_json) -+ message(FATAL_ERROR "The 'nlohmann_json' target was not found, and 'GEOMODEL_SETUP_JSON' was set to 'false'") -+ endif() - endif() --- -2.39.3 (Apple Git-145) diff --git a/thirdparty/GeoModel/CMakeLists.txt b/thirdparty/GeoModel/CMakeLists.txt deleted file mode 100644 index 0adb3aede35..00000000000 --- a/thirdparty/GeoModel/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# This file is part of the Acts project. -# -# Copyright (C) 2024 CERN for the benefit of the Acts project -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# CMake include(s). -include( FetchContent ) - -# Tell the user what's happening. -message( STATUS "Building GeoModel as part of the ACTS project" ) - -set( GEOMODEL_VERSION "${_acts_geomodel_version}") - -set(GEOMODEL_SETUP_JSON OFF CACHE BOOL "Skip setting up json completely" ) - -set(GEOMODEL_BUILD_GEOMODELG4 "${ACTS_BUILD_PLUGIN_GEANT4}" CACHE BOOL "Build the Geant4 plugin" ) - -# Declare where to get geomodel from. -FetchContent_Declare(geomodel ${ACTS_GEOMODEL_SOURCE} - PATCH_COMMAND git am ${CMAKE_CURRENT_SOURCE_DIR}/0001-Add-option-to-skip-setting-up-json-completely.patch) - -# Now set up its build. -FetchContent_MakeAvailable( geomodel ) diff --git a/thirdparty/GeoModel/README.md b/thirdparty/GeoModel/README.md deleted file mode 100644 index ab796bc783e..00000000000 --- a/thirdparty/GeoModel/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Build Recipe for GeoModel - -This directory holds a simple build recipe for the -[GeoModel](https://gitlab.cern.ch/GeoModelDev/GeoModel) project. It is used - in case `ACTS_USE_SYSTEM_GEOMODEL` is set to `FALSE` for the build.