From 666e63fc39ef0248902e98b55468d83ee04f8823 Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Fri, 18 Jul 2014 13:16:51 +0000 Subject: [PATCH] Move option calls before checking deprecated _WITH_ variables, otherwise _USE_ variables are overwritten when not set in command line --- CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ec26e9e8..751fd7335 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,12 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) #---Options------------------------------------------------------------------------- +option(DD4HEP_USE_XERCESC "Enable 'Detector Builders' based on XercesC" OFF) +option(DD4HEP_USE_PYROOT "Enable 'Detector Builders' based on PyROOT" OFF) # does not work (compile error) +option(DD4HEP_USE_GEANT4 "Enable the simulation part based on Geant4" OFF) +option(DD4HEP_USE_GEAR "Build gear wrapper for backward compatibility" OFF) +option(DD4HEP_USE_LCIO "Build lcio extensions" OFF) + #For backward compatibility for now IF( DEFINED DD4HEP_WITH_GEANT4 ) SET ( DD4HEP_USE_GEANT4 ${DD4HEP_WITH_GEANT4} ) @@ -38,14 +44,6 @@ IF( DEFINED DD4HEP_WITH_GEAR ) ENDIF() - -option(DD4HEP_USE_XERCESC "Enable 'Detector Builders' based on XercesC" OFF) -option(DD4HEP_USE_PYROOT "Enable 'Detector Builders' based on PyROOT" OFF) # does not work (compile error) -option(DD4HEP_USE_GEANT4 "Enable the simulation part based on Geant4" OFF) -option(DD4HEP_USE_GEAR "Build gear wrapper for backward compatibility" OFF) -option(DD4HEP_USE_LCIO "Build lcio extensions" OFF) - - #--------------------------------------------------------------------------------------- if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel." FORCE) -- GitLab