-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (38 loc) · 1.02 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
cmake_minimum_required (VERSION 3.15)
project (path_planner)
# GoogleTest requires at least C++14
# Structured bindings require at least C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS_RELEASE "-O1")
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR})
include_directories("${PROJECT_SOURCE_DIR}/include")
add_library(FlightPathLibrary
src/airports.cpp
src/flight_planner.cpp
)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
FetchContent_MakeAvailable(googletest)
enable_testing()
# Create solution
add_executable(flight_planner
src/main.cpp
)
target_link_libraries(flight_planner
FlightPathLibrary
)
# Create test
add_executable(flight_planner_test
test/flight_planner_test.cpp
test/graph_directed_test.cpp
)
target_link_libraries(flight_planner_test
FlightPathLibrary
GTest::gtest_main
)
include(GoogleTest)
gtest_discover_tests(flight_planner_test)