-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (34 loc) · 920 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
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.10)
project(CLAVIS LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Collect Source Files
file(GLOB CORE_SOURCES
src/*.cpp
src/graph/*.hpp
src/data_structure/*.hpp
src/sorting/*.hpp
)
# Collect Test Files
file(GLOB TEST_SOURCES
tests/*.cpp
tests/graph/*.cpp
tests/data_structure/*.cpp
tests/sorting/*.cpp
)
# Integrate All Sources
set(SOURCES ${CORE_SOURCES})
# Create Library
add_library(clavis_algorithm ${SOURCES})
# Google Test Setup
find_package(GTest REQUIRED)
enable_testing()
# Test Execution File
add_executable(clavis_algorithm_test ${TEST_SOURCES})
# Include Directories
target_include_directories(clavis_algorithm_test PRIVATE
${CMAKE_SOURCE_DIR}/src
)
target_link_libraries(clavis_algorithm_test clavis_algorithm GTest::GTest GTest::Main)
# Register Test
add_test(NAME AlgorithmTest COMMAND clavis_algorithm_test)