Implemented find/find closest for B+ tree.
Added test suite. Fixed some b+ tree bugs.
This commit is contained in:
@@ -1,7 +1,41 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(SDB C)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
project(SDB C)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/lib)
|
||||
add_executable(SDB src/main.c src/InputBuffer.c src/InputBuffer.h src/SQL.c src/SQL.h src/scanner.c src/scanner.h src/parser.c src/parser.h src/bplus_tree.c src/bplus_tree.h)
|
||||
#Check options
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCSourceRuns)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckTypeSize)
|
||||
set(INCLUDES "")
|
||||
macro(ck_check_include_file header var)
|
||||
check_include_files("${INCLUDES};${header}" ${var})
|
||||
if(${var})
|
||||
set(INCLUDES ${INCLUDES} ${header})
|
||||
endif(${var})
|
||||
endmacro(ck_check_include_file)
|
||||
|
||||
ck_check_include_file("stdlib.h" HAVE_STDLIB_H)
|
||||
check_type_size(intmax_t INTMAX_T)
|
||||
check_type_size(uintmax_t UINTMAX_T)
|
||||
|
||||
check_type_size(pid_t PID_T)
|
||||
if(NOT HAVE_PID_T)
|
||||
if(WIN32)
|
||||
set(pid_t "int")
|
||||
else(WIN32)
|
||||
MESSAGE(FATAL_ERROR "pid_t doesn't exist on this platform?")
|
||||
endif(WIN32)
|
||||
endif(NOT HAVE_PID_T)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME check_SDB COMMAND check_SDB)
|
||||
Reference in New Issue
Block a user