-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (37 loc) · 1.24 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
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.4.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if($ENV{ROS_DISTRO} STREQUAL "noetic")
set(CMAKE_C_COMPILER clang-12)
set(CMAKE_CXX_COMPILER clang++-12)
endif()
project(NaiveSLAM)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g")
add_compile_definitions(NDEBUG)
message(STATUS "compiler is " ${CMAKE_CXX_COMPILER_ID})
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
message(STATUS "use ccache to speed up re-compilation!")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(COMMON_HEADER ${ROOT_DIR}/common)
option(USE_BAG "USE ROSBAG OR NOT" OFF)
message("USE ROSBAG OR NOT: " ${USE_BAG})
find_package(Eigen3 REQUIRED)
find_package(spdlog REQUIRED)
set(NANOFLANN ${CMAKE_CURRENT_SOURCE_DIR}/third_parties/nanoflann/include)
add_definitions(-DCONFIG_FILE="${ROOT_DIR}/config/params.json")
if(USE_BAG)
add_definitions(-DUSE_BAG)
endif()
add_subdirectory(config)
add_subdirectory(PCR)
add_subdirectory(filter)
add_subdirectory(dataproxy)
add_subdirectory(frontend)
add_subdirectory(backend)
add_subdirectory(test)
add_subdirectory(app)