-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
38 lines (28 loc) · 885 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
36
37
38
cmake_minimum_required(VERSION 2.8)
project(euler)
# use C++11
set(CMAKE_CXX_FLAGS "-std=c++11")
# Library
set(SOURCES
src/io.cpp
src/rotations.cpp
)
add_library(euler_rotations ${SOURCES})
target_include_directories(euler_rotations PUBLIC
include
)
# Application
add_executable(euler apps/euler.cpp)
target_link_libraries(euler euler_rotations)
# Install
install(TARGETS euler DESTINATION bin)
# Testing
enable_testing()
add_executable(test_io test/test_io.cpp test/catch/catch_main.cpp)
target_include_directories(test_io PRIVATE test)
target_link_libraries(test_io euler_rotations)
add_test(NAME test_io COMMAND test_io)
add_executable(test_rotations test/test_rotations.cpp test/catch/catch_main.cpp)
target_include_directories(test_rotations PRIVATE test)
target_link_libraries(test_rotations euler_rotations)
add_test(NAME test_rotations COMMAND test_rotations)