regex-engine/CMakeLists.txt
Camden Dixie O'Brien c58cabd2e6 Replace build scripts with CMake
Rebuilding everything each time was getting a bit slow.
2024-10-27 00:12:57 +01:00

20 lines
546 B
CMake

cmake_minimum_required(VERSION 3.10)
project(regex-engine LANGUAGES C)
option(SANITIZERS "Enable address and UB sanitizers")
enable_testing()
function(set_default_target_options target)
set_property(TARGET ${target} PROPERTY C_STANDARD 11)
target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic)
if(${SANITIZERS})
target_compile_options(${target} PRIVATE -fsanitize=address,undefined)
target_link_options(${target} PRIVATE -fsanitize=address,undefined)
endif()
endfunction()
add_subdirectory(lib)
add_subdirectory(tests)