regex-engine/CMakeLists.txt

23 lines
657 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)
set_property(TARGET ${target} PROPERTY C_EXTENSIONS OFF)
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)
add_subdirectory(demo)
add_subdirectory(benchmarks)