-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (27 loc) · 1.18 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
cmake_minimum_required (VERSION 3.8)
project (SpatialLib)
include(CTest)
set (CMAKE_CXX_STANDARD 20)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wfloat-equal -Wundef -Wcast-align -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wshadow -Woverloaded-virtual -Wimplicit-fallthrough -Wsign-conversion -Winline -std=c++${CMAKE_CXX_STANDARD} -Ofast")
set (CXX_STANDARD_REQUIRED ON)
file(GLOB_RECURSE
source_files
${PROJECT_SOURCE_DIR}/*.hpp
)
file(GLOB_RECURSE
test_files
${PROJECT_SOURCE_DIR}/tests/**.cpp
${PROJECT_SOURCE_DIR}/tests/**.hpp
)
add_executable (SpatialLibTest ${source_files} ${test_files})
set_target_properties(SpatialLibTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/")
target_compile_options (SpatialLibTest PUBLIC -fexceptions)
add_test(SpatialLibTest SpatialLibTest)
file(GLOB_RECURSE
expirement_files
${PROJECT_SOURCE_DIR}/expirements/**.cpp
${PROJECT_SOURCE_DIR}/expirements/**.hpp
)
add_executable (KDTreeExpirements ${source_files} ${expirement_files})
set_target_properties(KDTreeExpirements PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/")
target_compile_options (KDTreeExpirements PUBLIC -fexceptions)