Initial garbage colletor implementation
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
@ -7,13 +7,25 @@ project(
|
||||
VERSION 1.0
|
||||
LANGUAGES C)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
ht
|
||||
GIT_REPOSITORY https://git.zander.im/Zander671/ht.git
|
||||
GIT_TAG 9a1b271cfdc8ab203f9d6aa6a83cc4523de422be)
|
||||
|
||||
FetchContent_MakeAvailable(ht)
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
include(CTest)
|
||||
endif()
|
||||
|
||||
add_compile_options(-fsanitize=address,leak,undefined)
|
||||
add_link_options(-fsanitize=address,leak,undefined)
|
||||
|
||||
add_library(refcount src/allocator.c src/list.c src/refcount.c)
|
||||
target_link_libraries(refcount PUBLIC ht)
|
||||
target_include_directories(refcount PUBLIC include/)
|
||||
target_compile_options(refcount PRIVATE -Wall)
|
||||
target_compile_options(refcount PRIVATE -Wall -Wpedantic)
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||
add_subdirectory(test/)
|
||||
|
Reference in New Issue
Block a user