-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
73 lines (58 loc) · 1.6 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
CMAKE_MINIMUM_REQUIRED(VERSION 3.11.0 FATAL_ERROR)
Set(HAL_VERSION 0)
Set(HAL_MAJOR_VERSION 1)
project(Hal)
enable_language(Fortran)
#for test only
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
if(NOT DEFINED CMAKE_CXX_STANDARD)
#Message(WARNING "CMAke standard not set, setting to 17")
Set(CMAKE_CXX_STANDARD 17)
endif()
#check if simpath detected
Set(USE_FAIRROOT FALSE)
if(DEFINED FAIRROOT)
if(FAIRROOT STREQUAL "ON")
Set(USE_FAIRROOT TRUE)
endif()
endif()
Set(USE_EXAMPLES FALSE)
if(DEFINED EXAMPLES)
if(EXAMPLES STREQUAL "ON")
Set(USE_EXAMPLES TRUE)
endif()
endif()
if(USE_FAIRROOT)
if(NOT DEFINED ENV{SIMPATH} AND NOT DEFINED SIMPATH)
message (FATAL_ERROR "\
You did not define the environment variable SIMPATH or define SIMPATH when calling cmake. \
Either of the two is needed to properly find the external packages. \
Please either set this environment variable or pass -DSIMPATH=<path> and execute cmake again. \
")
endif()
if (NOT DEFINED SIMPATH)
set(SIMPATH $ENV{SIMPATH})
endif()
endif()
#check if fairroot disabled
if (USE_FAIRROOT)
include(cmake/modules/CMakeFairRoot.cmake)
else()
include(cmake/modules/CMakeListsExternal.cmake)
endif()
if(DEFINED CIA)
add_compile_definitions(__CIA__ GLOBAL)
endif()
PrintConfig()
SetHeaderVariables(${CMAKE_SOURCE_DIR})
WriteConfig()
if (USE_FAIRROOT)
add_subdirectory(fair)
endif()
add_subdirectory (data)
add_subdirectory (cuts)
add_subdirectory (features)
add_subdirectory (analysis)
if(USE_EXAMPLES)
add_subdirectory(examples)
endif()