From f66500a9e6f25626108b936dd0dd6d4d94e16516 Mon Sep 17 00:00:00 2001 From: Marko Petric <marko.petric@cern.ch> Date: Fri, 16 Jun 2017 22:26:26 +0200 Subject: [PATCH] Account boost option from cmake --- CMakeLists.txt | 6 +++++- cmake/DD4hep.cmake | 16 ---------------- cmake/DD4hepBuild.cmake | 1 - cmake/DD4hepConfig.cmake.in | 1 - 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d951d0a46..12a486c06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,11 @@ dd4hep_configure_output( OUTPUT "${PROJECT_BINARY_DIR}" INSTALL "${CMAKE_INSTALL find_package ( ROOT REQUIRED COMPONENTS Geom GenVector Eve Gui Graf3d RGL EG) include(${ROOT_USE_FILE}) message ( STATUS "ROOT_VERSION: ${ROOT_VERSION}" ) - +# +# Include Boost +# +find_package( Boost REQUIRED ) +add_definitions( -DBOOST_SPIRIT_USE_PHOENIX_V3 ) #--------------------------------------------------------------------------------------------------- #fg: moved to here from DD4hep.cmake to not force CMAKE_CXX_FLAGS upon dependent packages dd4hep_set_compiler_flags() diff --git a/cmake/DD4hep.cmake b/cmake/DD4hep.cmake index a861f7a61..499e6ae68 100644 --- a/cmake/DD4hep.cmake +++ b/cmake/DD4hep.cmake @@ -19,22 +19,6 @@ if(CMAKE_INSTALL_PREFIX) endif() #--------------------------------------------------------------------------------------------------- -# Need this fix, since the cmake name is Geant4 and on GEANT4 -if(DD4HEP_USE_GEANT4) - set ( DD4HEP_USE_BOOST ON ) # Boost is required ! -endif() -#--------------------------------------------------------------------------------------------------- -if(DD4HEP_USE_BOOST) - #message(FATAL_ERROR "Boost is required ${DD4HEP_USE_BOOST}") - if ( "${Boost_INCLUDE_DIRS}" STREQUAL "" ) - find_package( Boost REQUIRED ) - ##include_directories( SYSTEM ${Boost_INCLUDE_DIRS} ) - endif() - add_definitions( -DDD4HEP_USE_BOOST ) - add_definitions( -DBOOST_SPIRIT_USE_PHOENIX_V3 ) -else() - set ( DD4HEP_USE_BOOST OFF ) -endif() # Main functional include file if ( "${DD4hepBuild_included}" STREQUAL "" ) include ( DD4hepBuild ) diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index 8f8122f81..1d7431de7 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -251,7 +251,6 @@ function ( dd4hep_print_options ) dd4hep_print ( "| DD4hep build setup: " ) dd4hep_print ( "| " ) dd4hep_print ( "| CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH} " ) - dd4hep_print ( "| DD4HEP_USE_BOOST: ${DD4HEP_USE_BOOST} DD4HEP_USE_Boost:${DD4HEP_USE_Boost}" ) dd4hep_print ( "| DD4HEP_USE_XERCESC: ${DD4HEP_USE_XERCESC} " ) dd4hep_print ( "| XERCESC_ROOT_DIR: ${XERCESC_ROOT_DIR} " ) dd4hep_print ( "| DD4HEP_USE_LCIO: ${DD4HEP_USE_LCIO} " ) diff --git a/cmake/DD4hepConfig.cmake.in b/cmake/DD4hepConfig.cmake.in index f994e3650..9eb51c039 100644 --- a/cmake/DD4hepConfig.cmake.in +++ b/cmake/DD4hepConfig.cmake.in @@ -17,7 +17,6 @@ set ( DD4hep_DIR "$ENV{DD4hep_DIR}" ) set ( DD4hep_ROOT "$ENV{DD4hep_ROOT}" ) set ( DD4hep_VERSION "@DD4hep_VERSION@" ) set ( DD4hep_SOVERSION "@DD4hep_SOVERSION@" ) -set ( DD4HEP_USE_BOOST "@DD4HEP_USE_BOOST@" ) set ( DD4HEP_USE_GEANT4 "@DD4HEP_USE_GEANT4@" ) set ( DD4HEP_USE_XERCESC "@DD4HEP_USE_XERCESC@" ) set ( DD4HEP_USE_CXX11 "@DD4HEP_USE_CXX11@" ) -- GitLab