-
Notifications
You must be signed in to change notification settings - Fork 87
/
CMakeLists.txt
43 lines (32 loc) · 903 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
if (CMAKE_COMPILER_IS_GNUCC)
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE)
if (ENABLE_COVERAGE)
add_compile_options(--coverage -O0)
endif()
endif()
add_subdirectory(3rd_party/google-test)
add_library(dubins
src/dubins.c)
target_include_directories(dubins
PUBLIC
include)
target_link_libraries(dubins
PUBLIC
m)
target_link_libraries(dubins PRIVATE --coverage)
if (MSVC)
target_compile_options(dubins PRIVATE /W3)
else()
target_compile_options(dubins PRIVATE -Wall -Wextra -Wpedantic -std=gnu89)
endif()
enable_testing()
add_executable(unittest_dubins
tests/montecarlo_tests.cpp
tests/stableapi_tests.cpp)
target_link_libraries(unittest_dubins
dubins
GTest::Main
GTest::GTest)
target_link_libraries(unittest_dubins --coverage)
add_test(unittest_dubins unittest_dubins)