-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (29 loc) · 1.22 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
cmake_minimum_required(VERSION 3.24.0)
project(Suffix_Array_Project)
add_executable(${PROJECT_NAME} src/main.cpp)
add_subdirectory(include/Functions)
target_include_directories(${PROJECT_NAME} PUBLIC include/Functions)
target_link_directories(${PROJECT_NAME} PRIVATE include/Functions)
target_link_libraries(${PROJECT_NAME} Functions)
#get googletest
include(FetchContent)
FetchContent_Declare(googletest
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG release-1.12.1)
FetchContent_GetProperties(googletest)
#googletest_POPULATED
#googletest_SOURCE_DIR
#googletest_BUILD_DIR
if(NOT googletest_POPULATED)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BUILD_DIR})
endif()
add_executable(Testing test/test.cpp)
target_include_directories(Testing PUBLIC include/Functions)
target_link_directories(Testing PRIVATE include/Functions)
target_link_libraries(Testing Functions gtest_main gmock_main)
add_subdirectory(benchmark)
add_executable(Benchmark src/benchmark.cpp)
target_include_directories(Benchmark PUBLIC include/Functions)
target_link_directories(Benchmark PRIVATE include/Functions)
target_link_libraries(Benchmark benchmark::benchmark Functions)