|
|
|
|
@ -5,8 +5,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
|
|
|
|
set(project_name toREST) |
|
|
|
|
project (${project_name}) |
|
|
|
|
|
|
|
|
|
message(${CMAKE_MODULE_PATH}) |
|
|
|
|
|
|
|
|
|
find_package(Boost COMPONENTS regex system thread coroutine context filesystem date_time REQUIRED) |
|
|
|
|
find_package(LibTorrent REQUIRED) |
|
|
|
|
find_package(OpenSSL REQUIRED) |
|
|
|
|
@ -32,24 +30,24 @@ set(global_libraries
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
add_library(project_shared OBJECT ${source_files}) |
|
|
|
|
|
|
|
|
|
# add_executable(${project_name} ./src/main.cxx $<TARGET_OBJECTS:project_shared>) |
|
|
|
|
# target_link_libraries(${project_name} ${global_libraries}) |
|
|
|
|
|
|
|
|
|
enable_testing() |
|
|
|
|
|
|
|
|
|
file(GLOB test_files "./tests/*.cpp") |
|
|
|
|
file(GLOB test_stubs "./tests/stubs/*.cpp") |
|
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -Wall -fprofile-arcs -ftest-coverage ") |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -Wall -fprofile-arcs -ftest-coverage ") |
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage ") |
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage ") |
|
|
|
|
|
|
|
|
|
set(test test${project_name}) |
|
|
|
|
add_executable(${test} ${test_files} $<TARGET_OBJECTS:project_shared>) |
|
|
|
|
target_include_directories(${test} PUBLIC ../lib/Catch) |
|
|
|
|
target_link_libraries(${test} ${global_libraries}) |
|
|
|
|
set(test test_${project_name}) |
|
|
|
|
add_test(${test} ${test}) |
|
|
|
|
add_executable(${test} ${test_files} ${test_stubs} $<TARGET_OBJECTS:project_shared>) |
|
|
|
|
target_include_directories(${test} PUBLIC ../lib/Catch ./tests/include) |
|
|
|
|
target_link_libraries(${test} ${global_libraries}) |
|
|
|
|
|
|
|
|
|
add_executable(${project_name} ./src/main.cxx $<TARGET_OBJECTS:project_shared>) |
|
|
|
|
target_link_libraries(${project_name} ${global_libraries}) |
|
|
|
|
|
|
|
|
|
find_package(Doxygen) |
|
|
|
|
|
|
|
|
|
|