Shuttle has mandatory requirement for ROOT to be build with ApMon support.
But ROOT does not point to the ApMon installation therefore we need
to provide the ApMon installation
ApMon
find_package(DIM)
endif()
- if(DIM_FOUND)
- find_package(DATE)
- else()
- message(FATAL_ERROR "DATE enabled but no DIMDIR and ODIR set. Please set DIMDIR and ODIR")
+ if(DATE_CONFIG)
+ if(DIM_FOUND)
+ find_package(DATE)
+ else()
+ message(FATAL_ERROR "DATE enabled but no DIMDIR and ODIR set. Please set DIMDIR and ODIR")
+ endif()
endif()
# daqDA
find_package(daqDA)
endif(daqDA)
- # AMORE
+ # AMORE -> requires ROOT to be installed
# Setting variables in cache to be accesible by ccmake
set(AMORE_CONFIG CACHE STRING "amore-config script location")
if(AMORE_CONFIG)
endif(NOT DA)
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 DIM_FOUND)
- set(DA FALSE)
- message(FATAL_ERROR "DAs enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)")
- endif()
-
- if(NOT DATE_FOUND)
- set(DA FALSE)
- message(FATAL_ERROR "DAs enabled but no DATE support found. Please point to your date installation using \"DATE_CONFIG\" variable")
- endif()
-
- if(NOT daqDA_FOUND)
- set(DA FALSE)
- message(FATAL_ERROR "DAs enabled but no daqDA support found. Please point to your daqDA installation using \"daqDA\" variable")
- endif()
-
- if(NOT AMORE_FOUND)
- set(DA FALSE)
- message(FATAL_ERROR "DAs enabled but no AMORE support found. Please point to your AMORE installation using \"AMORE_CONFIG\" variable")
- endif()
+ # 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 DIM_FOUND)
+ set(DA FALSE)
+ message(FATAL_ERROR "DAs enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)")
+ endif()
+
+ if(NOT DATE_FOUND)
+ set(DA FALSE)
+ message(FATAL_ERROR "DAs enabled but no DATE support found. Please point to your date installation using \"DATE_CONFIG\" variable")
+ endif()
+
+ if(NOT daqDA_FOUND)
+ set(DA FALSE)
+ message(FATAL_ERROR "DAs enabled but no daqDA support found. Please point to your daqDA installation using \"daqDA\" variable")
+ endif()
+
+ if(NOT AMORE_FOUND)
+ set(DA FALSE)
+ message(FATAL_ERROR "DAs enabled but no AMORE support found. Please point to your AMORE installation using \"AMORE_CONFIG\" variable")
+ endif()
- # Enable static libraries
- set(ALIROOT_STATIC TRUE)
- message(STATUS "DAs enabled")
+ # Enable static libraries
+ set(ALIROOT_STATIC TRUE)
+ message(STATUS "DAs enabled")
endif(DA)
# MDC rpm creation enables the static build
# # Setting variables in cache to be accesible by ccmake
set(SHUTTLE CACHE STRING "Enable SHUTTLE build : ON")
if(SHUTTLE)
+ if(NOT ROOT_HASMONALISA)
+ message(FATAL_ERROR "ROOT was not build with MonAlisa support")
+ endif()
+
+ find_package(ApMon)
+
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")
endif()
# DIM include folder and libraries folder
include_directories(${DIM_INCLUDE_DIR})
+# Include ApMon.h needed by ROOT monalisa interface
+include_directories(${ApMon_INCLUDE_DIR})
+
# Sources in alphabetical order
set(SRCS
AliEmptyPreprocessor.cxx
# Generate the ROOT map
# Dependecies
set(LIBDEPS STEERBase CDB Core Eve Gui Hist Minuit2 Minuit Net ProofPlayer RIO Spectrum Thread TMVA)
-if(DIM_FOUND)
- set(LIBDEPS ${LIBDEPS} ${DIM_LIBRARIES})
-endif()
+set(LIBDEPS ${LIBDEPS} ${DIM_LIBRARIES})
generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
--- /dev/null
+# Find for ApMon library
+# Setting:
+# - ApMon_LIBRARIES
+# - ApMon_INCLUDE_DIR
+
+set(ApMon_FOUND FALSE)
+
+if(ApMon)
+ # check for the existance of the ApMon library
+ find_library(ApMon_LIBRARIES NAMES apmoncpp PATHS ${ApMon}/lib NO_DEFAULT_PATH DOC "Path to ApMon library")
+
+ if(NOT ApMon_LIBRARIES)
+ message(FATAL_ERROR "Could not locate ApMon library inside ${ApMon}/lib")
+ else()
+ message(STATUS "Found ApMon library: ${ApMon_LIBRARIES}")
+ endif()
+
+ # check for the existance of the ApMin header
+ find_path(ApMon_INCLUDE_DIR NAMES ApMon.h PATHS ${ApMon}/include NO_DEFAULT_PATH DOC "Path to ApMon header folder.")
+
+ if(NOT ApMon_INCLUDE_DIR)
+ message(FATAL_ERROR "Could not find ApMon header inside ${ApMon}/include")
+ else()
+ message(STATUS "Found ApMon header folder: ${ApMon_INCLUDE_DIR}")
+ endif()
+
+ set(ApMon_FOUND TRUE)
+ mark_as_advanced(${ApMon_LIBRARIES} ${ApMon_INCLUDE_DI})
+else()
+ message(FATAL_ERROR "Please point to the ApMon installation using -DApMon=/install/point")
+endif(ApMon)
\ No newline at end of file
# - ROOT_HASALIEN - ROOT was built with AliEn support
# - ROOT_HASOPENGL - ROOT was built with OpenGL support
# - ROOT_HASXML - ROOT was built with XML support
+# - ROOT_HASMONALISA - ROOT was built with MonAlisa support - needed by SHUTTLE
# - ROOT_FORTRAN - fortran compiler
set(ROOT_FOUND FALSE)
endif()
endif(ROOT_HASXML)
+ # Checking for monalisa support
+ execute_process(COMMAND ${ROOT_CONFIG} --has-monalisa OUTPUT_VARIABLE ROOT_HASMONALISA ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
+ if(error)
+ message(FATAL_ERROR "Error checking if ROOT was built with monalisa support: ${error}")
+ endif(error)
+
+ # if defined
+ if(ROOT_HASMONALISA)
+ string(STRIP "${ROOT_HASMONALISA}" ROOT_HASMONALISA)
+ if(ROOT_HASMONALISA STREQUAL "yes")
+ set(ROOT_HASMONALISA TRUE)
+ else()
+ set(ROOT_HASMONALISA FALSE)
+ endif()
+ endif(ROOT_HASMONALISA)
+
# Checking for OpenGL support
execute_process(COMMAND ${ROOT_CONFIG} --has-opengl OUTPUT_VARIABLE ROOT_HASOPENGL ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
if(error)