Optimize cmake and reduce the find_package.
Merge request reports
Activity
Filter activity
There are some duplications:
$ find . -path ./build.103.0.2.x86_64-centos7-gcc11-opt -prune -o -name CMakeLists.txt | xargs -I{} grep find_package -H {} ./Detector/DetCEPCv4/CMakeLists.txt:find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) ./Detector/DetCEPCv4/CMakeLists.txt:# find_package(DD4hep) ./Detector/DetCEPCv4/CMakeLists.txt:find_package(Geant4) ./Detector/DetCEPCv4/CMakeLists.txt:find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) ./Detector/DetCRD/CMakeLists.txt:find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) ./Detector/DetCRD/CMakeLists.txt:# find_package(DD4hep) ./Detector/DetCRD/CMakeLists.txt:find_package(Geant4) ./Detector/DetCRD/CMakeLists.txt:find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) ./Detector/DetDriftChamber/CMakeLists.txt:find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) ./Detector/DetDriftChamber/CMakeLists.txt:find_package(Geant4) ./Detector/DetDriftChamber/CMakeLists.txt:find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) ./Detector/DetEcalMatrix/CMakeLists.txt:find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) ./Detector/DetEcalMatrix/CMakeLists.txt:find_package(Geant4) ./Detector/DetEcalMatrix/CMakeLists.txt:find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) ./Detector/DetSegmentation/CMakeLists.txt:find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) ./Generator/CMakeLists.txt:find_package(Geant4 REQUIRED) ./Simulation/DetSimAna/CMakeLists.txt:find_package(Geant4 REQUIRED ui_all vis_all) ./Simulation/DetSimCore/CMakeLists.txt:find_package(Geant4 REQUIRED ui_all vis_all) ./Simulation/DetSimDedx/CMakeLists.txt:find_package(Geant4 REQUIRED ui_all vis_all) ./Simulation/DetSimDedx/CMakeLists.txt:find_package(Garfield REQUIRED) ./Simulation/DetSimDedx/CMakeLists.txt:find_package(OnnxRuntime REQUIRED) ./Simulation/DetSimGeom/CMakeLists.txt:find_package(Geant4 REQUIRED ui_all vis_all) ./Simulation/DetSimSD/CMakeLists.txt:find_package(Geant4 REQUIRED ui_all vis_all) ./Simulation/DetSimFastModel/CMakeLists.txt:find_package(Geant4 REQUIRED ui_all vis_all)
$ find . -path ./build.103.0.2.x86_64-centos7-gcc11-opt -prune -o -name CMakeLists.txt | xargs -I{} grep 'include(' -H {} ./Detector/DetCEPCv4/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Detector/DetCEPCv4/CMakeLists.txt:include( DD4hep ) ./Detector/DetCRD/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Detector/DetCRD/CMakeLists.txt:include( DD4hep ) ./Detector/DetDriftChamber/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Detector/DetDriftChamber/CMakeLists.txt:include( DD4hep ) ./Detector/DetEcalMatrix/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Detector/DetEcalMatrix/CMakeLists.txt:include( DD4hep ) ./Detector/DetSegmentation/CMakeLists.txt:include(DD4hep) ./Simulation/DetSimAna/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Simulation/DetSimCore/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Simulation/DetSimDedx/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Simulation/DetSimGeom/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Simulation/DetSimSD/CMakeLists.txt:include(${Geant4_USE_FILE}) ./Simulation/DetSimFastModel/CMakeLists.txt:include(${Geant4_USE_FILE})
mentioned in commit dccfa767
Please register or sign in to reply