]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
CMake: Define configuration variable as CACHE
authoragrigora <alina.grigoras@cern.ch>
Fri, 30 Jan 2015 13:41:52 +0000 (14:41 +0100)
committeragrigora <alina.grigoras@cern.ch>
Fri, 30 Jan 2015 13:42:08 +0000 (14:42 +0100)
 - Define all configuration variables as CACHE to be accesible
   from ccache
 - mark_as_advanced different variables from the Find macros

CMakeLists.txt
cmake/FindDATE.cmake
cmake/FindFASTJET.cmake
cmake/FindROOT.cmake
cmake/FinddaqDA.cmake

index 36fefac61c6a880918a6c8599c2a503542a79fdf..3cc44a1961727a49c758f5a99fd85eff5574fe55 100644 (file)
@@ -68,6 +68,10 @@ endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
 
 # DATE
 # date-config needs DIMDIR and ODIR set
+# Setting variables in cache to be accesible by ccmake
+set(DATE_CONFIG CACHE STRING "date-config script location")
+set(DIMDIT CACHE STRING "dim installation folder")
+set(ODIR CACHE STRING "dim plaform, usually \"linux\"")
 if(DATE_CONFIG)
     if(DIMDIR AND ODIR)
         find_package(DATE)
@@ -77,11 +81,15 @@ if(DATE_CONFIG)
 endif()
 
 # daqDA
+# Setting variables in cache to be accesible by ccmake
+set(daqDA CACHE STRING "daqDA library folder installation")
 if(daqDA)
     find_package(daqDA)
 endif(daqDA)
 
 # AMORE
+# Setting variables in cache to be accesible by ccmake
+set(AMORE_CONFIG CACHE STRING "amore-config script location")
 if(AMORE_CONFIG)
     if(ROOTSYS)
         find_package(AMORE)
@@ -91,6 +99,9 @@ if(AMORE_CONFIG)
 endif(AMORE_CONFIG)
 
 # id DARPM we enable DA if it is not set
+# Setting variables in cache to be accesible by ccmake
+set(DARPM CACHE STRING "Enable DARPM: ON")
+set(DA CACHE STRING "Enable DA: ON")
 if(DARPM)
     if(NOT DA)
         set(DA ON)
@@ -98,6 +109,8 @@ if(DARPM)
 endif(DARPM)
 
 # DA is enabled
+# Setting variables in cache to be accesible by ccmake
+set(ALIROOT_STATIC CACHE STRING "ENABLE static building of AliRoot: ON")
 if(DA)
     if(NOT DIMDIR AND NOT ODIR)
         set(DA FALSE)
@@ -125,6 +138,8 @@ if(DA)
 endif(DA)
 
 # MDC rpm creation enables the static build
+# Setting variables in cache to be accesible by ccmake
+set(MDCRPM CACHE STRING "Enable mdc rpm build")
 if(MDCRPM)
     set(ALIROOT_STATIC TRUE)
     message(STATUS "AliMDC RPM enabled. AliRoot static build enabled")
@@ -133,6 +148,8 @@ endif(MDCRPM)
 # ROOT configuration mandatory
 # FindRoot has to be after the enabling of DA due to libRootExtra
 # Do not put it above DA
+# Setting variables in cache to be accesible by ccmake
+set(ROOTSYS CACHE STRING "ROOT installation folder")
 if(ROOTSYS)
     find_package(ROOT REQUIRED)
 
@@ -266,6 +283,8 @@ add_subdirectory(QAref)
 
 # Enable SHUTTLE compilation
 # Check if DIMDIR and ODIR are set
+# # Setting variables in cache to be accesible by ccmake
+set(SHUTTLE CACHE STRING "Enable SHUTTLE build : ON")
 if(SHUTTLE)
     if(ROOT_HASALIEN STREQUAL "no")
        message(FATAL_ERROR "Shuttle needs ROOT build with AliEn support. Please build ROOT with AliEn support. Do not forget to set ALIEN to your AliEn installation")
index 21ac9250557ffb228bf130b1f14312a4125a8595..ad8c03e18efa01c231201c7ea8da3487daa8456f 100644 (file)
@@ -62,6 +62,7 @@ endfunction(find_date_libraries _output library_list library_paths)
 
 # DATE_CONFIG set from the configuration
 if(DATE_CONFIG)
+
     # Setting DIMDIR, ODIR and ROOTSYS in the environment, they are needed by date-config
     set(ENV{DIMDIR} ${DIMDIR})
     set(ENV{ODIR} ${ODIR})
index 1faa55975372092f220056f28bf0873f794f1e23..74050bb4af87c3e4ea9ffbb58447f758fb335478 100644 (file)
@@ -36,6 +36,7 @@ if(FASTJET)
     if(NOT FASTJET_CONFIG)
         message(FATAL_ERROR "Could not find fastjet-config executable")
     endif(NOT FASTJET_CONFIG)
+    mark_as_advanced(FASTJET_CONFIG)
 
     # Check for header installation
     find_path(FASTJETHH include/fastjet/PseudoJet.hh PATHS ${FASTJET})
@@ -43,6 +44,7 @@ if(FASTJET)
     if (FASTJETHH-NOTFOUND)
         message(FATAL_ERROR "Header file fastjet/PseudoJet.hh not found in ${FASTJET}/include. Please check your FASTJET installation")
     endif(FASTJETHH-NOTFOUND)
+    mark_as_advanced(FASTJETHH)
 
     # FastJet version
     execute_process(COMMAND ${FASTJET_CONFIG} --version OUTPUT_VARIABLE FASTJET_VERSION ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
index a4ad078a79cb294586fc71b98ab168ac068254dc..5028194a8933384231c7015736736d075bb8c384 100644 (file)
@@ -49,6 +49,7 @@ if(ROOTSYS)
     if(NOT ROOT_CONFIG)
         message(FATAL_ERROR "Could not find root-config script.")
     endif(NOT ROOT_CONFIG)
+    mark_as_advanced(ROOT_CONFIG)
 
     # Check for rlibmap
     find_program(ROOT_LIBMAP NAMES rlibmap rootcling PATHS ${ROOTSYS}/bin NO_DEFAULT_PATH)
@@ -57,6 +58,7 @@ if(ROOTSYS)
     else()
         message(FATAL_ERROR "Could not find rlibmap executable.")
     endif(ROOT_LIBMAP)
+    mark_as_advanced(ROOT_LIBMAP)
 
     # Check for rootcint
     find_program(ROOT_CINT NAMES rootcint PATHS ${ROOTSYS}/bin NO_DEFAULT_PATH)
@@ -65,6 +67,7 @@ if(ROOTSYS)
     else()
         message(FATAL_ERROR "Could not find rootcint executable.")
     endif(ROOT_CINT)
+    mark_as_advanced(ROOT_CINT)
 
     # Checking ROOT version
     execute_process(COMMAND ${ROOT_CONFIG} --version OUTPUT_VARIABLE ROOT_VERSION ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
index 4565063a796647250bd8e04b5b3ba33168fa79f7..79d12fc921b821f1c6ad372aaa783b113baa5d81 100644 (file)
@@ -24,12 +24,14 @@ if(daqDA)
     if(DAQDAH-NOTFOUND)
         message(FATAL_ERROR "daqDA enabled but daqDA.h not found. Please check that daqDA points to your installation")
     endif(DAQDAH-NOTFOUND)
-    
+    mark_as_advanced(DAQDAH)
+
     find_path(DAQDALIB libdaqDA.a PATHS ${daqDA})
     
     if(DAQDALIB-NOTFOUND)
         message(FATAL_ERROR "daqDA enabled but libdaqDA.a not found. Please check that daqDA points to your installation")
     endif(DAQDALIB-NOTFOUND)
+    mark_as_advanced(DAQDALIB)
 
     set(daqDA_FOUND TRUE)
 endif(daqDA)
\ No newline at end of file