forked from OwnZones/efp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
27 lines (20 loc) · 1.11 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
cmake_minimum_required(VERSION 3.10)
project(efp)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
#Code coverage Clang
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
#Code coverage GCC
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
find_package (Threads REQUIRED)
add_library(efp STATIC ElasticFrameProtocol.cpp ElasticFrameProtocol.h ElasticInternal.h)
add_library(efp_shared SHARED ElasticFrameProtocol.cpp)
file(GLOB unit_tests "${CMAKE_CURRENT_SOURCE_DIR}/unitTests/*.cpp")
file(GLOB unit_test_template "${CMAKE_CURRENT_SOURCE_DIR}/unitTestTemplate/*.cpp")
add_executable(efptests main.cpp ${unit_test_template} ${unit_tests} ElasticFrameProtocol.cpp)
target_link_libraries(efptests Threads::Threads)
set(CMAKE_C_STANDARD 99)
add_executable(test_efp_c_api ${CMAKE_CURRENT_SOURCE_DIR}/efp_c_api/main.c)
target_link_libraries(test_efp_c_api efp Threads::Threads)