-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (59 loc) · 2.17 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
cmake_minimum_required(VERSION 3.3)
project(crabber)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
message (FATAL_ERROR
"In-source builds are not allowed. Please clean your source tree and try again.")
endif()
# Determine if this is top-level or embedded project
if (PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME)
set(TopLevel TRUE)
else()
set(TopLevel FALSE)
endif()
# Default is release with debug info
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo Coverage." FORCE)
endif()
# Add path for custom modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
if (TopLevel)
if (IS_DIRECTORY "${CRAB_ROOT}" AND EXISTS ${CRAB_ROOT}/CMakeLists.txt)
## Needed by Crab
find_package (Boost 1.65.0)
if (Boost_FOUND)
include_directories (${Boost_INCLUDE_DIRS})
endif ()
## Crab source code already exists out-of-the tree
set(CRAB_BINARY_DIR crab) ## needed if CRAB_ROOT out of tree.
add_subdirectory(${CRAB_ROOT} ${CRAB_BINARY_DIR})
include_directories(${CRAB_INCLUDE_DIRS})
message(STATUS "Crab found in ${CRAB_ROOT}. CRAB_INCLUDE_DIRS=${CRAB_INCLUDE_DIRS} CRAB_LIBS=${CRAB_LIBS}")
else ()
message(FATAL_ERROR "crab not found in \"${CRAB_ROOT}\". Set CRAB_ROOT")
endif()
endif()
include_directories(${crabber_SOURCE_DIR}/external)
include_directories(${crabber_SOURCE_DIR}/include)
add_executable(crabber
src/crabber.cpp
src/parser.cpp
src/crabir_builder.cpp
src/analyzer.cpp
src/domains/boxes_domain.cpp
src/domains/dis_interval_domain.cpp
src/domains/fixed_tvpi_domain.cpp
src/domains/interval_domain.cpp
src/domains/octagons_domain.cpp
src/domains/pk_domain.cpp
src/domains/pk_pplite_domain.cpp
src/domains/symbolic_terms.cpp
src/domains/zones_domain.cpp
)
target_link_libraries(crabber PRIVATE ${CRAB_LIBS})
install(TARGETS crabber DESTINATION bin)
install(DIRECTORY include/crabber DESTINATION include)