Correctly configure tests when building with -DDD4HEP_BUILD_EXAMPLES=ON
Usage example: mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=<install-dir> \ -DDD4HEP_USE_GEANT4=ON \ -DDD4HEP_USE_XERCESC=ON \ -DDD4HEP_USE_TBB=ON \ -DBoost_NO_BOOST_CMAKE=ON \ -DDD4HEP_BUILD_EXAMPLES=ON \ -DBUILD_TESTING=ON \ .. cmake --build . -j8 --target install ctest -j8 --output-on-failure This reverts commit e2f826e9. The build system outside of "examples" assumes that DD4hep_DIR points to the source tree. Switching this meaning on the fly makes things rather fragile. For instance, dd4hep_configure_scripts() is broken after the if(DD4HEP_BUILD_EXAMPLES) block if the test is true, otherwise not. This commit consistently points DD4hep_ROOT to the installation tree and DD4hep_DIR to the source tree.
Showing
- CMakeLists.txt 1 addition, 1 deletionCMakeLists.txt
- cmake/thisdd4hep_package.sh.in 1 addition, 1 deletioncmake/thisdd4hep_package.sh.in
- examples/CLICSiD/CMakeLists.txt 5 additions, 5 deletionsexamples/CLICSiD/CMakeLists.txt
- examples/CMakeLists.txt 10 additions, 0 deletionsexamples/CMakeLists.txt
- examples/ClientTests/CMakeLists.txt 6 additions, 5 deletionsexamples/ClientTests/CMakeLists.txt
- examples/DDG4/CMakeLists.txt 2 additions, 2 deletionsexamples/DDG4/CMakeLists.txt
- examples/DDG4_MySensDet/CMakeLists.txt 1 addition, 1 deletionexamples/DDG4_MySensDet/CMakeLists.txt
- examples/LHeD/CMakeLists.txt 3 additions, 3 deletionsexamples/LHeD/CMakeLists.txt
- examples/LHeD/scripts/LheSimu.py 1 addition, 1 deletionexamples/LHeD/scripts/LheSimu.py
Loading
Please register or sign in to comment