forked from cfanatic/vsomeip-fuzzing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (30 loc) · 1.32 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
cmake_minimum_required(VERSION 2.8)
project(vsomeip-testing)
set(CMAKE_CXX_FLAGS "-g -std=c++0x")
option(USE_GCC "Set gcc compiler support for AFL coverage report generation" OFF)
option(COVERAGE "Set gcc compiler flags for AFL coverage report generation" OFF)
if (USE_GCC)
message("-- Enable gcc compiler support for AFL coverage reports")
add_definitions(-DCOMPILE_WITH_GCC)
endif()
if (COVERAGE)
message("-- Set gcc compiler flags for AFL coverage reports")
set(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
set(GCC_COVERAGE_LINK_FLAGS "-lgcov")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
endif()
find_package(vsomeip3 3.1.14 REQUIRED)
find_package(Boost 1.65.1 COMPONENTS system thread log REQUIRED)
include_directories(
${VSOMEIP_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
)
add_executable(response response.cpp)
add_executable(request request.cpp)
add_executable(publish publish.cpp)
add_executable(fuzzing fuzzing.cpp)
target_link_libraries(response vsomeip3 vsomeip3-sd ${Boost_LIBRARIES})
target_link_libraries(request vsomeip3 vsomeip3-sd ${Boost_LIBRARIES})
target_link_libraries(publish vsomeip3 vsomeip3-sd ${Boost_LIBRARIES})
target_link_libraries(fuzzing vsomeip3 vsomeip3-sd ${Boost_LIBRARIES})