-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (38 loc) · 1.03 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
cmake_minimum_required(VERSION 2.6)
project("cpptalksindex")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin/)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake-modules")
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
add_subdirectory(deps)
set(WARNING_FLAGS
-Wall
-Wextra
-Wshadow
-Wnon-virtual-dtor
-pedantic
-Wold-style-cast
-Wcast-align
-Wunused
-Woverloaded-virtual
-Wpedantic
-Wconversion
-Wsign-conversion
-Wdouble-promotion
-Wformat=2
)
option(BUILD_TESTS "Build the tests" ON)
add_executable(cpptalksindex
src/HTTPController.cpp
src/main.cpp
src/TalksDB.cpp
src/TalksLoader.cpp
src/Utils.cpp
)
target_compile_options(cpptalksindex PRIVATE ${WARNING_FLAGS})
target_link_libraries(cpptalksindex json expected range-v3 GSL httplib pthread)
target_include_directories(cpptalksindex PUBLIC include)
set_property(TARGET cpptalksindex PROPERTY CXX_STANDARD 17)
set_property(TARGET cpptalksindex PROPERTY CXX_STANDARD_REQUIRED ON)
if (BUILD_TESTS)
add_subdirectory(tests)
endif()