-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
59 lines (47 loc) · 1.75 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
cmake_minimum_required(VERSION 3.9)
set(PROPOSAL_VERSION_MAJOR 7)
set(PROPOSAL_VERSION_MINOR 6)
set(PROPOSAL_VERSION_PATCH 2)
set(PROPOSAL_VERSION ${PROPOSAL_VERSION_MAJOR}.${PROPOSAL_VERSION_MINOR}.${PROPOSAL_VERSION_PATCH})
project(PROPOSAL
VERSION ${PROPOSAL_VERSION}
LANGUAGES CXX
DESCRIPTION "The very best photon and lepton propagator."
)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type has been specified. Using default system build type. You may want to change this to"
"'Release' if you are using PROPOSAL for production purposes.")
else()
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG")
message(WARNING "Build type set to ${CMAKE_BUILD_TYPE}. This build type should only be used for development "
"and debugging purposes and not for production since the runtime of PROPOSAL with be significantly higher!")
else()
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
endif()
endif()
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
message(STATUS
"Set -fPIC=True because it's not further specified and neccessary for "
"the python bindings.")
SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_CXX_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
option(BUILD_PYTHON "build python interface" OFF)
option(BUILD_EXAMPLE "build example" OFF)
option(BUILD_DOCUMENTATION "build documentation" OFF)
option(BUILD_TESTING "build testing" OFF)
add_subdirectory(src)
if(BUILD_EXAMPLE)
add_subdirectory(example)
endif()
if(BUILD_DOCUMENTATION)
add_subdirectory(docs)
endif()
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()