Warning, /DD4hep/examples/SimpleDetector/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #==========================================================================
0002 # AIDA Detector description implementation
0003 #--------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 #
0010 #==========================================================================
0011 cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
0012
0013 IF(NOT TARGET DD4hep::DDCore)
0014 find_package ( DD4hep REQUIRED )
0015 include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
0016 include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake )
0017 dd4hep_configure_output()
0018 ENDIF()
0019
0020 dd4hep_set_compiler_flags()
0021 #==========================================================================
0022 if(TARGET XercesC::XercesC)
0023 SET(OPT_XERCESC XercesC::XercesC)
0024 endif()
0025
0026 dd4hep_add_plugin(SimpleDetector SOURCES src/*.cpp
0027 USES DD4hep::DDCore DD4hep::DDRec ROOT::Core ROOT::Geom ROOT::GenVector ${OPT_XERCESC}
0028 )
0029 install(TARGETS SimpleDetector LIBRARY DESTINATION lib)
0030 install(DIRECTORY compact DESTINATION examples/ClientTests)
0031 #-----------------------------------------------------------------------------------
0032 dd4hep_configure_scripts(SimpleDetector DEFAULT_SETUP WITH_TESTS)
0033
0034 #*** Testing *********************************************************************
0035 foreach (test Simple_ILD)
0036 ## dd4hep_add_test_reg( SimpleDetector_converter_gdml
0037 ## COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_SimpleDetector.sh"
0038 ## EXEC_ARGS geoConverter -compact2gdml -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml -output file:${test}.gdml
0039 ## REGEX_PASS " Successfully extracted GDML to")
0040 foreach( type description vis )
0041 dd4hep_add_test_reg( SimpleDetector_converter_${type}
0042 COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_SimpleDetector.sh"
0043 EXEC_ARGS geoConverter -compact2${type} -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml -output file:${test}.${type}
0044 REGEX_PASS " Handled [1-9][0-9]* volumes")
0045 endforeach(type)
0046 endforeach(test)