2023-01-18 00:36:59 +08:00
|
|
|
if (NOT FTXUI_BUILD_TESTS_FUZZER)
|
2023-01-15 03:37:42 +08:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2021-06-26 21:14:27 +08:00
|
|
|
set(CMAKE_C_COMPILER clang)
|
|
|
|
set(CMAKE_CXX_COMPILER clang++)
|
2023-05-19 17:17:32 +08:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
2021-07-17 21:53:25 +08:00
|
|
|
|
|
|
|
function(fuzz name)
|
|
|
|
add_executable(${name}
|
|
|
|
src/ftxui/component/${name}.cpp
|
|
|
|
)
|
2023-05-26 01:34:34 +08:00
|
|
|
target_include_directories(${name} PRIVATE src)
|
|
|
|
target_link_libraries(${name} PRIVATE component)
|
|
|
|
target_compile_options(${name} PRIVATE -fsanitize=fuzzer,address)
|
|
|
|
target_link_libraries(${name} PRIVATE -fsanitize=fuzzer,address)
|
|
|
|
target_compile_features(${name} PRIVATE cxx_std_17)
|
2021-07-17 21:53:25 +08:00
|
|
|
endfunction(fuzz)
|
|
|
|
|
|
|
|
fuzz(terminal_input_parser_test_fuzzer)
|
|
|
|
fuzz(component_fuzzer)
|