-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
104 lines (84 loc) · 1.73 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
cmake_minimum_required(VERSION 3.16)
project(extsort)
set(CMAKE_CXX_STANDARD 11)
include_directories(${CMAKE_SOURCE_DIR}/src/include)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
aux_source_directory(src SORT_SRCS)
aux_source_directory(src/io IO_SRCS)
aux_source_directory(src/util UTIL_SRCS)
set(
SRCS
${SORT_SRCS}
${IO_SRCS}
)
message("Sources files:" ${SRCS})
add_executable(
buffer_test
test/buffer_test.cpp
${SRCS}
)
target_link_libraries(
buffer_test
gtest_main
)
add_executable(
optional_test
test/optional_test.cpp
${SRCS}
)
target_link_libraries(
optional_test
gtest_main
)
add_executable(
buffer_iter_test
test/buffer_iter_test.cpp
${SRCS}
)
target_link_libraries(
buffer_iter_test
gtest_main
)
add_executable(
file_test
test/file_test.cpp
${SRCS}
)
target_link_libraries(
file_test
gtest_main
)
add_executable(
file_iter_test
test/file_iterator_test.cpp
${SRCS}
)
target_link_libraries(
file_iter_test
gtest_main
)
add_executable(
two_level_iter_test
test/two_level_iter_test.cpp
${SRCS}
)
target_link_libraries(
two_level_iter_test
gtest_main
)
add_executable(
sort_test
test/sort_test.cpp
${SRCS}
)
target_link_libraries(
sort_test
gtest_main
)