-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (31 loc) · 1.56 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
cmake_minimum_required(VERSION 3.9)
project(Cplusplus)
set(CMAKE_CXX_STANDARD 11)
ADD_SUBDIRECTORY (lib/googletest)
enable_testing()
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
# Now simply link your own targets against gtest, gmock,
# etc. as appropriate
include_directories(lib/googletest/googletest/include)
include_directories(lib/googletest/googlemock/include)
set(SOURCE_FILES main.cpp )
set(SOURCE_FILES
"Data Structures and Algorithms/Data structures/Binary Search/BinarySearch_TEST.cpp"
"Data Structures and Algorithms/Data structures/AVL/AVL_TEST.cpp"
"Data Structures and Algorithms/Data structures/Disjoint-set-union/DSU_TEST.cpp"
"Data Structures and Algorithms/Data structures/Trie/Trie_TEST.cpp"
"Data Structures and Algorithms/Data structures/List/List_TEST.cpp"
"Data Structures and Algorithms/Algorithms/Search/Search_TEST.cpp"
"Data Structures and Algorithms/Algorithms/Sorts/Sort_TEST.cpp"
"Data Structures and Algorithms/Data structures/Stack & Queue/Stack_TEST.cpp"
"Data Structures and Algorithms/Data structures/Stack & Queue/Queue_TEST.cpp"
"Data Structures and Algorithms/Data structures/Heap/Heap_TEST.cpp")
add_executable(Cplusplus_test ${SOURCE_FILES})
# Make leak
add_custom_target(
leak
COMMAND make -j4
COMMAND valgrind --track-origins=yes --error-exitcode=2 --leak-check=full --verbose ./Cplusplus_test
# COMMAND valgrind --leak-check=full -v ./Cplusplus_test
)
target_link_libraries(Cplusplus_test gtest gtest_main)