Skip to content
Snippets Groups Projects
CMakeLists.txt 1.6 KiB
Newer Older
#==========================================================================
Markus Frank's avatar
Markus Frank committed
#  AIDA Detector description implementation 
#--------------------------------------------------------------------------
# Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
# All rights reserved.
#
# For the licensing terms see $DD4hepINSTALL/LICENSE.
# For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
#
#==========================================================================
Christoph Hombach's avatar
Christoph Hombach committed
#
# Simple CMakeList.txt file that allows to
Markus Frank's avatar
Markus Frank committed
# build all dd4hep examples in one go, e.g.
Markus Frank's avatar
Markus Frank committed
# . ./bin/thisdd4hep.sh
Christoph Hombach's avatar
Christoph Hombach committed
# cd examples ;
# mkdir build ; cd build
# cmake ..
#
# F.Gaede, DESY, 2013
# 
# M.Frank, CERN, 2015:  Adapt to new cmake scripts
#==========================================================================
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project( DD4hep_Examples )

Andre Sailer's avatar
Andre Sailer committed
include(CTest)
Frank Gaede's avatar
Frank Gaede committed
option(BUILD_TESTING "Enable and build tests" ON)
SET( ENV{DD4hepExamplesINSTALL} ${CMAKE_INSTALL_PREFIX} )

IF(NOT TARGET DD4hep::DDCore)
  find_package ( DD4hep REQUIRED )
ENDIF()
Markus Frank's avatar
Markus Frank committed
dd4hep_configure_output()
#==========================================================================

SET(DD4HEP_EXAMPLES "AlignDet CLICSiD ClientTests Conditions DDCMS DDCodex DDDB DDDigi DDG4 DDG4_MySensDet LHeD OpticalSurfaces Persistency SimpleDetector"
  CACHE STRING "List of DD4hep Examples to build")
SEPARATE_ARGUMENTS(DD4HEP_EXAMPLES)
MESSAGE(STATUS "Will be building these examples: ${DD4HEP_EXAMPLES}")
FOREACH(DDExample IN LISTS DD4HEP_EXAMPLES)
  dd4hep_print("|> Building ${DDExample}")
  add_subdirectory(${DDExample})
ENDFOREACH()