-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
67 lines (51 loc) · 1.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
cmake_minimum_required( VERSION 2.6 )
cmake_policy(SET CMP0048 NEW)
project(
RICC
VERSION 0.0.1
)
include_directories( ${PROJECT_SOURCE_DIR}/include )
include_directories( ${PROJECT_SOURCE_DIR}/third_party/json/single_include )
include_directories( ${PROJECT_SOURCE_DIR}/third_party/curlpp/include )
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(
CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/CMakeModules/"
)
set(
CMAKE_CXX_FLAGS_DEBUG
"-g -Wall -Wextra -pedantic -O0 -DDEBUG_MODE"
)
set(
CMAKE_CXX_FLAGS_RELEASE
"-Wall -Wextra -pedantic -O2"
)
set(
CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'"
)
set(
RICC_PUBLIC_HEADER
"${PROJECT_SOURCE_DIR}/include/ricc/ricc-parser.hpp"
)
set(
EXECUTABLE_OUTPUT_PATH
${CMAKE_BINARY_DIR}/bin
)
install(
FILES
${RICC_PUBLIC_HEADER}
DESTINATION
include/ricc
)
add_custom_target(
uninstall
cat install_manifest.txt | xargs rm
)
add_subdirectory(third_party)
add_subdirectory(src)
enable_testing()
add_subdirectory(tests)