Skip to content
Snippets Groups Projects
Commit 4937f92b authored by Ole Hansen's avatar Ole Hansen Committed by Andre Sailer
Browse files

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.
parent 740936c9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment