-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (26 loc) · 928 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
cmake_minimum_required(VERSION 3.5)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
find_package(Eigen3 REQUIRED)
set(BUILD_EXAMPLES ON CACHE BOOL "Build included examples")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(CTest)
set(COMMON_COMPILE_FLAGS "-std=c++14 -Wall -Wno-int-in-bool-context")
set(UNIT_TESTS
test/TestSystemModel.cc
test/TestObservationModel.cc
test/TestKalmanFilter.cc
test/TestExtendedKalmanFilter.cc
)
include_directories(${EIGEN3_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/include)
if(BUILD_TESTING)
enable_testing()
add_subdirectory("external/googletest")
include_directories("external/googletest/include")
add_executable(testrbest ${UNIT_TESTS})
target_link_libraries(testrbest PRIVATE gtest gtest_main)
set_target_properties(testrbest PROPERTIES COMPILE_FLAGS ${COMMON_COMPILE_FLAGS})
add_test(rbest testrbest)
endif()
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()