Skip to content
Snippets Groups Projects
  • Ole Hansen's avatar
    Correctly configure tests when building with -DDD4HEP_BUILD_EXAMPLES=ON · 4937f92b
    Ole Hansen authored
    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.
    4937f92b