CMakeLists.txt 2.22 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
2
3
4
5
6
set(${PROJECT_NAME}_FACTORY_TEST
  factory/activation.hpp
  factory/cost.hpp
  factory/pinocchio_model.hpp
  factory/random_generator.hpp
  factory/state.hpp
Sébastien Kleff's avatar
Sébastien Kleff committed
7
  factory/statelpf.hpp
8
9
10
  factory/lpf.hpp
  factory/diff-action.hpp
  factory/actuation.hpp
11
12
  factory/contact3d.hpp
  factory/contact1d.hpp
Guilhem Saurel's avatar
Guilhem Saurel committed
13
14
15
16
  factory/activation.cpp
  factory/cost.cpp
  factory/pinocchio_model.cpp
  factory/state.cpp
Sébastien Kleff's avatar
Sébastien Kleff committed
17
  factory/statelpf.cpp
18
19
20
  factory/lpf.cpp
  factory/diff-action.cpp
  factory/actuation.cpp
21
22
  factory/contact3d.cpp
  factory/contact1d.cpp
23
24
  )

Guilhem Saurel's avatar
Guilhem Saurel committed
25
26
add_library(${PROJECT_NAME}_unittest SHARED ${${PROJECT_NAME}_FACTORY_TEST})
target_link_libraries(${PROJECT_NAME}_unittest PUBLIC ${PROJECT_NAME} crocoddyl::crocoddyl)
27

Guilhem Saurel's avatar
Guilhem Saurel committed
28
ADD_UNIT_TEST(test_costs test_costs.cpp)
29
target_link_libraries(test_costs PUBLIC ${PROJECT_NAME}_unittest yaml-cpp)
30

Sébastien Kleff's avatar
Sébastien Kleff committed
31
32
33
ADD_UNIT_TEST(test_states test_states.cpp)
target_link_libraries(test_states PUBLIC ${PROJECT_NAME}_unittest)

34
35
ADD_UNIT_TEST(test_stateslpf test_stateslpf.cpp)
target_link_libraries(test_stateslpf PUBLIC ${PROJECT_NAME}_unittest)
Sébastien Kleff's avatar
Sébastien Kleff committed
36

37
38
ADD_UNIT_TEST(test_lpf test_lpf.cpp)
target_link_libraries(test_lpf PUBLIC ${PROJECT_NAME}_unittest)
39

40
41
ADD_UNIT_TEST(test_contact3d test_contact3d.cpp)
target_link_libraries(test_contact3d PUBLIC ${PROJECT_NAME}_unittest)
42

43
44
45
46
47
ADD_UNIT_TEST(test_contact1d test_contact1d.cpp)
target_link_libraries(test_contact1d PUBLIC ${PROJECT_NAME}_unittest)

ADD_UNIT_TEST(test_diff_actions test_diff_actions.cpp)
target_link_libraries(test_diff_actions PUBLIC ${PROJECT_NAME}_unittest)
48

49
50
51
52
ADD_UNIT_TEST(test_walk_params test_walk_params.cpp)
target_link_libraries(test_walk_params PUBLIC ${PROJECT_NAME}_unittest)
target_compile_definitions(test_walk_params PRIVATE PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")

53
if(BUILD_PYTHON_INTERFACE)
54
55
56
57
58
59
60
  if(BUILD_PY2CPP_INTERFACE)
    ADD_UNIT_TEST(test_init_shooting_problem test_init_shooting_problem.cpp)
    target_link_libraries(test_init_shooting_problem PUBLIC ${PROJECT_NAME}_py2cpp)
    target_compile_definitions(test_init_shooting_problem PRIVATE PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
    #set_tests_properties(test_init_shooting_problem PROPERTIES ENVIRONMENT
    #   "PYTHONPATH=${PROJECT_SOURCE_DIR}/mpc:${PROJECT_BINARY_DIR}/python")
  endif()
61

62
63
  add_subdirectory(python)
endif()