-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (44 loc) · 1.26 KB
/
CMakeLists.txt
File metadata and controls
52 lines (44 loc) · 1.26 KB
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
49
50
51
52
cmake_minimum_required(VERSION 3.28)
project(REMath C CXX)
# =============================
# Enable testing
# =============================
enable_testing()
# =============================
# Collect all test .cpp files
# =============================
file(GLOB_RECURSE TEST_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/tests/*.c
${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp
)
# =============================
# Create test executable
# =============================
add_executable(re_tests
${TEST_SOURCES}
)
# =============================
# Include paths
# =============================
target_include_directories(re_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include # RE Library
${CMAKE_CURRENT_SOURCE_DIR}/dependencies/GLM # GLM Library
)
# =============================
# Compile features
# =============================
target_compile_features(re_tests PRIVATE
c_std_99
cxx_std_20
)
# =============================
# Compiler options (enable SSE3 for SIMD intrinsics)
# =============================
target_compile_options(re_tests PRIVATE
$<$<C_COMPILER_ID:GNU,Clang>:-msse3>
$<$<CXX_COMPILER_ID:GNU,Clang>:-msse3>
)
# =============================
# Register CTest test
# =============================
add_test(NAME re_tests COMMAND re_tests)