-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (28 loc) · 906 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
cmake_minimum_required(VERSION 3.5)
project(ipddp)
find_package(PythonLibs REQUIRED)
find_package (Eigen3 REQUIRED NO_MODULE)
# find_package (SymEngine REQUIRED)
include_directories(
ipddp/
)
if (BUILD_EXAMPLE)
# autodiff requires a c++17 enabled compiler
set(CMAKE_CXX_STANDARD 17) # ensure cmake instructs compiler to use C++17
set(CMAKE_CXX_STANDARD_REQUIRED ON) # ensure the C++ standard given before is actually used
set(CMAKE_CXX_EXTENSIONS OFF) # avoid compile flags of the type -std=gnu++1z added by cmake
include_directories(
eigen/
matplotlibcpp/
autodiff/
${PYTHON_INCLUDE_DIRS}
example/model/
)
add_executable(${PROJECT_NAME}
example/main.cpp
)
target_compile_options(${PROJECT_NAME} PRIVATE -O2)
target_link_libraries(${PROJECT_NAME}
${PYTHON_LIBRARIES}
)
endif()