forked from MobileRoboticsSkoltech/mrob
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (51 loc) · 1.97 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Pre-requisites about cmake itself
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
PROJECT(mrob)
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_EXTENSIONS ON)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") #TODO: /Wall but disable noisy warnings
ADD_COMPILE_DEFINITIONS(_USE_MATH_DEFINES)
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-inconsistent-missing-override")
ELSE()
ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
IF(ANDROID)
SET(BUILD_TESTING OFF)
ELSE(ANDROID)
SET(BUILD_TESTING ON)
enable_testing()
ENDIF(ANDROID)
MESSAGE(STATUS "Build Tests: ${BUILD_TESTING}")
# ===================================================================
INCLUDE_DIRECTORIES(SYSTEM ./external/Eigen)
# ===================================================================
# CODE: main modules and directories are included here
# MROB modules. Remove those that are not necessary, by default all are active
INCLUDE_DIRECTORIES(./src/common)
ADD_SUBDIRECTORY(./src/common)
INCLUDE_DIRECTORIES(./src/geometry)
ADD_SUBDIRECTORY(./src/geometry)
INCLUDE_DIRECTORIES(./src/FGraph)
ADD_SUBDIRECTORY(./src/FGraph)
INCLUDE_DIRECTORIES(./src/PCRegistration)
ADD_SUBDIRECTORY(./src/PCRegistration)
#INCLUDE_DIRECTORIES(./src/EigenFactors)
#ADD_SUBDIRECTORY(./src/EigenFactors)
# ===================================================================
# New modules should be included here
IF(NOT ANDROID)
ADD_SUBDIRECTORY(./external/pybind11)
ADD_SUBDIRECTORY(./mrobpy)
ENDIF(NOT ANDROID)