引入红黑树近似查询

This commit is contained in:
2024-07-01 00:28:04 +08:00
parent f0abee1463
commit 9ce3503ec5
3 changed files with 176 additions and 11 deletions

View File

@@ -5,9 +5,19 @@ set(CMAKE_CXX_STANDARD 17)
include_directories(include)
add_executable(DataStruct
main.cpp
add_library(DataStruct
src/RedBlackTree.cpp
src/HeapSort.cpp
include/HeapSort.h
)
if (DEFINED ENABLE_TEST)
add_executable(myTest
main.cpp
)
enable_testing()
find_package(GTest REQUIRED)
target_link_libraries(myTest PRIVATE GTest::GTest GTest::Main DataStruct)
set(GTEST_LIB gtest gtest_main)
add_test(NAME myTest COMMAND myTest)
endif ()