Skip to content

Commit c28485c

Browse files
committed
alibuild compatible
1 parent 367cc19 commit c28485c

22 files changed

+2229
-438
lines changed

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.2 FATAL_ERROR)
2+
3+
### CMP0025 Compiler id for Apple Clang is now AppleClang.
4+
### CMP0042 MACOSX_RPATH is enabled by default.
5+
6+
FOREACH (p
7+
CMP0025 # CMake 3.0
8+
CMP0042 # CMake 3.0
9+
)
10+
IF (POLICY ${p})
11+
cmake_policy(SET ${p} NEW)
12+
ENDIF ()
13+
endforeach ()
14+
15+
116
add_subdirectory(Framework)
217
add_subdirectory(Modules)
318
add_subdirectory(doc)

Framework/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22
# General project definition
33
####################################
44

5-
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.2 FATAL_ERROR)
6-
7-
### CMP0025 Compiler id for Apple Clang is now AppleClang.
8-
### CMP0042 MACOSX_RPATH is enabled by default.
9-
10-
FOREACH (p
11-
CMP0025 # CMake 3.0
12-
CMP0042 # CMake 3.0
13-
)
14-
IF (POLICY ${p})
15-
cmake_policy(SET ${p} NEW)
16-
ENDIF ()
17-
endforeach ()
18-
195
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # project specific cmake dir
206
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
217

@@ -24,7 +10,6 @@ project(QualityControl)
2410
# Load some basic macros which are needed later on
2511
include(O2Utils)
2612
include(QualityControlDependencies)
27-
include(O2) # to be removed
2813

2914
# TODO make it required, once in its own repo
3015
if(ROOT_FOUND)

Modules/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
2121
project(QualityControlModules)
2222

2323
# Load some basic macros which are needed later on
24-
include(O2)
2524
include(O2Utils)
2625
include(QualityControlDependencies)
2726

@@ -64,8 +63,6 @@ ENDIF ()
6463
# Add compiler flags for warnings and (more importantly) fPIC and debug symbols
6564
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -fPIC")
6665

67-
link_o2_subproject(QualityControl)
68-
6966
add_subdirectory(Common)
7067
add_subdirectory(Example)
7168
add_subdirectory(Skeleton)

cmake/CPackConfig.cmake

Lines changed: 0 additions & 89 deletions
This file was deleted.

cmake/FindCommon.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# - Try to find the O2 Common package include dirs and libraries
2+
# Author: Barthelemy von Haller
3+
#
4+
# This script will set the following variables:
5+
# Common_FOUND - System has Common
6+
# Common_INCLUDE_DIRS - The Common include directories
7+
# Common_LIBRARIES - The libraries needed to use Common
8+
# Common_DEFINITIONS - Compiler switches required for using Common
9+
#
10+
# This script can use the following variables:
11+
# Common_ROOT - Installation root to tell this module where to look. (it tries LD_LIBRARY_PATH otherwise)
12+
13+
# Init
14+
include(FindPackageHandleStandardArgs)
15+
16+
# find includes
17+
find_path(COMMON_INCLUDE_DIR Timer.h
18+
HINTS ${Common_ROOT}/include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/Common" "../../include/Common" )
19+
# Remove the final "Common"
20+
get_filename_component(COMMON_INCLUDE_DIR ${COMMON_INCLUDE_DIR} DIRECTORY)
21+
set(Common_INCLUDE_DIRS ${COMMON_INCLUDE_DIR})
22+
23+
# find library
24+
find_library(COMMON_LIBRARY NAMES Common HINTS ${Common_ROOT}/lib ENV LD_LIBRARY_PATH)
25+
set(Common_LIBRARIES ${COMMON_LIBRARY})
26+
27+
# handle the QUIETLY and REQUIRED arguments and set COMMON_FOUND to TRUE
28+
# if all listed variables are TRUE
29+
find_package_handle_standard_args(Common "Common could not be found. Install package Common or set Common_ROOT to its root installation directory."
30+
COMMON_LIBRARY COMMON_INCLUDE_DIR)
31+
32+
if(${COMMON_FOUND})
33+
message(STATUS "Common found : ${Common_LIBRARIES}")
34+
endif()
35+
36+
mark_as_advanced(COMMON_INCLUDE_DIR COMMON_LIBRARY)

cmake/FindConfiguration.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# - Try to find the O2 Configuration package include dirs and libraries
2+
# Author: Barthelemy von Haller
3+
#
4+
# This script will set the following variables:
5+
# Configuration_FOUND - System has Configuration
6+
# Configuration_INCLUDE_DIRS - The Configuration include directories
7+
# Configuration_LIBRARIES - The libraries needed to use Configuration
8+
# Configuration_DEFINITIONS - Compiler switches required for using Configuration
9+
#
10+
# This script can use the following variables:
11+
# Configuration_ROOT - Installation root to tell this module where to look. (it tries LD_LIBRARY_PATH otherwise)
12+
13+
# Init
14+
include(FindPackageHandleStandardArgs)
15+
16+
# find includes
17+
find_path(CONFIGURATION_INCLUDE_DIR Configuration.h
18+
HINTS ${Configuration_ROOT}/include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/Configuration" "../../include/Configuration" )
19+
# Remove the final "Configuration"
20+
get_filename_component(CONFIGURATION_INCLUDE_DIR ${CONFIGURATION_INCLUDE_DIR} DIRECTORY)
21+
set(Configuration_INCLUDE_DIRS ${CONFIGURATION_INCLUDE_DIR})
22+
23+
# find library
24+
find_library(CONFIGURATION_LIBRARY NAMES Configuration HINTS ${Configuration_ROOT}/lib ENV LD_LIBRARY_PATH)
25+
set(Configuration_LIBRARIES ${CONFIGURATION_LIBRARY})
26+
27+
# handle the QUIETLY and REQUIRED arguments and set CONFIGURATION_FOUND to TRUE
28+
# if all listed variables are TRUE
29+
find_package_handle_standard_args(Configuration "Configuration could not be found. Install package Configuration or set Configuration_ROOT to its root installation directory."
30+
CONFIGURATION_LIBRARY CONFIGURATION_INCLUDE_DIR)
31+
32+
if(${CONFIGURATION_FOUND})
33+
message(STATUS "Configuration found : ${Configuration_LIBRARIES}")
34+
endif()
35+
36+
mark_as_advanced(CONFIGURATION_INCLUDE_DIR CONFIGURATION_LIBRARY)

cmake/FindDataSampling.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# - Try to find the O2 DataSampling package include dirs and libraries
2+
# Author: Barthelemy von Haller
3+
#
4+
# This script will set the following variables:
5+
# DataSampling_FOUND - System has DataSampling
6+
# DataSampling_INCLUDE_DIRS - The DataSampling include directories
7+
# DataSampling_LIBRARIES - The libraries needed to use DataSampling
8+
# DataSampling_DEFINITIONS - Compiler switches required for using DataSampling
9+
#
10+
# This script can use the following variables:
11+
# DataSampling_ROOT - Installation root to tell this module where to look. (it tries LD_LIBRARY_PATH otherwise)
12+
13+
# Init
14+
include(FindPackageHandleStandardArgs)
15+
16+
# find includes
17+
find_path(DATASAMPLING_INCLUDE_DIR SamplerInterface.h
18+
HINTS ${DataSampling_ROOT}/include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/DataSampling" "../../include/DataSampling" )
19+
# Remove the final "DataSampling"
20+
get_filename_component(DATASAMPLING_INCLUDE_DIR ${DATASAMPLING_INCLUDE_DIR} DIRECTORY)
21+
set(DataSampling_INCLUDE_DIRS ${DATASAMPLING_INCLUDE_DIR})
22+
23+
# find library
24+
find_library(DATASAMPLING_LIBRARY NAMES DataSampling HINTS ${DataSampling_ROOT}/lib ENV LD_LIBRARY_PATH)
25+
set(DataSampling_LIBRARIES ${DATASAMPLING_LIBRARY})
26+
27+
# handle the QUIETLY and REQUIRED arguments and set DATASAMPLING_FOUND to TRUE
28+
# if all listed variables are TRUE
29+
find_package_handle_standard_args(DataSampling "DataSampling could not be found. Install package DataSampling or set DataSampling_ROOT to its root installation directory."
30+
DATASAMPLING_LIBRARY DATASAMPLING_INCLUDE_DIR)
31+
32+
if(${DataSampling_FOUND})
33+
message(STATUS "DataSampling found : ${DataSampling_LIBRARIES}")
34+
endif()
35+
36+
mark_as_advanced(DATASAMPLING_INCLUDE_DIR DATASAMPLING_LIBRARY)

cmake/FindFairRoot.cmake

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
################################################################################
2+
# Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
3+
# #
4+
# This software is distributed under the terms of the #
5+
# GNU Lesser General Public Licence version 3 (LGPL) version 3, #
6+
# copied verbatim in the file "LICENSE" #
7+
################################################################################
8+
# Find FairRoot installation
9+
# Check the environment variable "FAIRROOTPATH" or "FAIRROOT_ROOT"
10+
11+
if(FairRoot_DIR)
12+
SET(FAIRROOTPATH ${FairRoot_DIR})
13+
elseif(DEFINED ENV{FAIRROOT_ROOT})
14+
SET(FAIRROOTPATH $ENV{FAIRROOT_ROOT})
15+
else()
16+
if(NOT DEFINED ENV{FAIRROOTPATH})
17+
set(user_message "You did not define the environment variable FAIRROOTPATH or FAIRROOT_ROOT which are needed to find FairRoot.\nPlease set one of these variables and execute cmake again." )
18+
if(FairRoot_FIND_REQUIRED)
19+
MESSAGE(FATAL_ERROR ${user_message})
20+
else(FairRoot_FIND_REQUIRED)
21+
MESSAGE(WARNING ${user_message})
22+
return()
23+
endif(FairRoot_FIND_REQUIRED)
24+
endif(NOT DEFINED ENV{FAIRROOTPATH})
25+
26+
SET(FAIRROOTPATH $ENV{FAIRROOTPATH})
27+
endif()
28+
29+
MESSAGE(STATUS "Setting FairRoot environment…")
30+
31+
FIND_PATH(FAIRROOT_INCLUDE_DIR NAMES FairRun.h PATHS
32+
${FAIRROOTPATH}/include
33+
NO_DEFAULT_PATH
34+
)
35+
36+
FIND_PATH(FAIRROOT_LIBRARY_DIR NAMES libBase.so libBase.dylib PATHS
37+
${FAIRROOTPATH}/lib
38+
NO_DEFAULT_PATH
39+
)
40+
41+
FIND_PATH(FAIRROOT_CMAKEMOD_DIR NAMES CMakeLists.txt PATHS
42+
${FAIRROOTPATH}/share/fairbase/cmake
43+
NO_DEFAULT_PATH
44+
)
45+
46+
47+
if(FAIRROOT_INCLUDE_DIR AND FAIRROOT_LIBRARY_DIR)
48+
set(FAIRROOT_FOUND TRUE)
49+
MESSAGE(STATUS "FairRoot ... - found ${FAIRROOTPATH}")
50+
MESSAGE(STATUS "FairRoot Library directory : ${FAIRROOT_LIBRARY_DIR}")
51+
MESSAGE(STATUS "FairRoot Include path… : ${FAIRROOT_INCLUDE_DIR}")
52+
MESSAGE(STATUS "FairRoot Cmake Modules : ${FAIRROOT_CMAKEMOD_DIR}")
53+
54+
else(FAIRROOT_INCLUDE_DIR AND FAIRROOT_LIBRARY_DIR)
55+
set(FAIRROOT_FOUND FALSE)
56+
#MESSAGE(FATAL_ERROR "FairRoot installation not found")
57+
endif (FAIRROOT_INCLUDE_DIR AND FAIRROOT_LIBRARY_DIR)
58+

cmake/FindInfoLogger.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# - Try to find the O2 InfoLogger package include dirs and libraries
2+
# Author: Barthelemy von Haller
3+
#
4+
# This script will set the following variables:
5+
# InfoLogger_FOUND - System has InfoLogger
6+
# InfoLogger_INCLUDE_DIRS - The InfoLogger include directories
7+
# InfoLogger_LIBRARIES - The libraries needed to use InfoLogger
8+
# InfoLogger_DEFINITIONS - Compiler switches required for using InfoLogger
9+
#
10+
# This script can use the following variables:
11+
# InfoLogger_ROOT - Installation root to tell this module where to look. (it tries LD_LIBRARY_PATH otherwise)
12+
13+
# Init
14+
include(FindPackageHandleStandardArgs)
15+
16+
# find includes
17+
find_path(INFOLOGGER_INCLUDE_DIR InfoLogger.h
18+
HINTS ${InfoLogger_ROOT}/include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/InfoLogger" "../../include/InfoLogger" )
19+
# Remove the final "InfoLogger"
20+
get_filename_component(INFOLOGGER_INCLUDE_DIR ${INFOLOGGER_INCLUDE_DIR} DIRECTORY)
21+
set(InfoLogger_INCLUDE_DIRS ${INFOLOGGER_INCLUDE_DIR})
22+
23+
# find library
24+
find_library(INFOLOGGER_LIBRARY NAMES InfoLogger HINTS ${InfoLogger_ROOT}/lib ENV LD_LIBRARY_PATH)
25+
set(InfoLogger_LIBRARIES ${INFOLOGGER_LIBRARY})
26+
27+
# handle the QUIETLY and REQUIRED arguments and set INFOLOGGER_FOUND to TRUE
28+
# if all listed variables are TRUE
29+
find_package_handle_standard_args(InfoLogger "InfoLogger could not be found. Install package InfoLogger or set InfoLogger_ROOT to its root installation directory."
30+
INFOLOGGER_LIBRARY INFOLOGGER_INCLUDE_DIR)
31+
32+
if(${InfoLogger_FOUND})
33+
message(STATUS "InfoLogger found : ${InfoLogger_LIBRARIES}")
34+
endif()
35+
36+
mark_as_advanced(INFOLOGGER_INCLUDE_DIR INFOLOGGER_LIBRARY)

0 commit comments

Comments
 (0)