forked from WolfgangWaltenberger/rave
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
52 lines (37 loc) · 2.09 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
# RAVE CMake build file for topmost folder
cmake_minimum_required (VERSION 2.6)
project (rave)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set (COMMON_COMPILE_FLAGS "")
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Descent compile configuratin
set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -DUSE_THREADING_NULL=1 -DDESCENT_LOG_ENABLED=1 -DUSE_SDL=1")
# common gcc settings
# -pedantic is not working because of usage of non-standard #warning in root config.h include ...
#set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -Wno-unused-local-typedef -Wno-pedantic -Werror -Wfatal-errors -Wall -Wno-unused-function -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-int-to-pointer-cast -Wno-unused-private-field -Wno-reorder -Wno-unused-variable -Wno-overloaded-virtual -std=c++11")
# less strict, to get it compiling first
set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -Wno-unused-local-typedef -Wno-pedantic -Wno-unused-function -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-int-to-pointer-cast -Wno-unused-private-field -Wno-reorder -Wno-unused-variable -Wno-overloaded-virtual -std=c++11")
endif()
# add some gcc specific options
if (CMAKE_COMPILER_IS_GNUCXX)
set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -Wno-maybe-uninitialized")
endif()
include(FindROOT)
include_directories(${ROOT_INCLUDE_DIR})
# no dll export statement for Linux compile
set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -DRaveDllExport=''")
add_definitions(-DPACKAGE_VERSION="0.6.25")
# important so some conversion code gets compiled for the kinematic fits
add_definitions(-DWITH_KINEMATICS=1)
include_directories(${rave_SOURCE_DIR}/src
${rave_SOURCE_DIR}/src/RaveBase/RaveInterface )
set (GENERAL_COMPILE_FLAGS " ${GENERAL_COMPILE_FLAGS} ${COMMON_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "-O3 -g -ggdb ${GENERAL_COMPILE_FLAGS}" )
add_subdirectory(src)
add_subdirectory(src/RaveBase)
add_subdirectory(src/RecoVertex)
# only if has_kinematic fit
add_subdirectory(src/RecoVertex/KinematicFit)
add_subdirectory(src/RecoBTag)
add_subdirectory(UnitTests)
add_subdirectory(tests)