forked from rhicspin/cnipol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (56 loc) · 1.74 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
# vim: set noexpandtab:
#
# Usage:
# export PATH=/star/u/cmake/bin:$PATH
# mkdir build; cd build
# cmake .. -DCMAKE_BUILD_TYPE=Release
# make
#
# After that you will only need to use make.
#
SET(CMAKE_C_FLAGS "-m32")
SET(CMAKE_CXX_FLAGS "-m32")
SET(CMAKE_SHARED_LINKER_FLAGS "-m32")
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(CNIPOL)
IF(CMAKE_VERSION VERSION_LESS "3.1")
SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
ELSE()
SET(CMAKE_CXX_STANDARD 11)
ENDIF()
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
#OPTION(FORCE_32BIT "should be OFF" OFF) # ON value is not supported
#OPTION(FORCE_32BIT "force 32bit" ON)
ADD_DEFINITIONS("-DCNIPOL_ROOT_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\"")
FIND_PACKAGE(Sqlite3)
FIND_PACKAGE(ROOT)
IF(${ROOT_VERSION} VERSION_GREATER "6.0")
MESSAGE(WARNING You are trying to build against ROOT6. cnipol in some
places uses ROOT2 style streamers that are broken in ROOT6. So
far problems observed with RecordMachineParams,
RecordTargetParams, AnaInfo.)
ENDIF()
#EXECUTE_PROCESS(
# COMMAND git submodule init
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# )
#EXECUTE_PROCESS(
# COMMAND git submodule update
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# )
ADD_SUBDIRECTORY(contrib/root-helper EXCLUDE_FROM_ALL)
SET(Boost_USE_MULTITHREADED OFF) # this is what we have at AFS installation
ADD_SUBDIRECTORY(contrib/opencdev EXCLUDE_FROM_ALL)
ADD_SUBDIRECTORY(contrib/mysqlpp EXCLUDE_FROM_ALL)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
SET(
CNIPOL_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/inc/
${CMAKE_CURRENT_SOURCE_DIR}/contrib/polarim-online/include/
${ROOT_HELPER_DIR}
)
INCLUDE_DIRECTORIES(
${CNIPOL_INCLUDE_DIRECTORIES}
)
ADD_SUBDIRECTORY(inc)
ADD_SUBDIRECTORY(src)