-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
28 lines (23 loc) · 946 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
cmake_minimum_required(VERSION 3.16)
project(lacam-project CXX)
add_subdirectory(./lacam)
add_subdirectory(./third_party/argparse)
add_subdirectory(./third_party/googletest)
add_executable(main main.cpp)
target_compile_features(main PUBLIC cxx_std_17)
target_link_libraries(main lacam argparse)
# test
set(TEST_MAIN_FUNC ./third_party/googletest/googletest/src/gtest_main.cc)
set(TEST_ALL_SRC ${TEST_MAIN_FUNC})
macro(add_test name target)
add_executable(${name} ${target} ${TEST_MAIN_FUNC})
target_link_libraries(${name} lacam gtest)
list(APPEND TEST_ALL_SRC ${target})
endmacro(add_test)
add_test(test_graph ./tests/test_graph.cpp)
add_test(test_instance ./tests/test_instance.cpp)
add_test(test_dist_table ./tests/test_dist_table.cpp)
add_test(test_planner ./tests/test_planner.cpp)
add_test(test_post_processing ./tests/test_post_processing.cpp)
add_executable(test_all ${TEST_ALL_SRC})
target_link_libraries(test_all lacam gtest)