1cmake_minimum_required(VERSION 3.5) 2 3# project name 4project (fuzz_test) 5 6set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../exe) 7set(CMAKE_EXE_LINKER_FLAGS -fsanitize=fuzzer) 8 9# Add executable 10file(GLOB TESTCASES src/*.cpp) 11foreach(srcfile ${TESTCASES}) 12 get_filename_component(testname ${srcfile} NAME_WE) 13 add_executable(${testname} ${srcfile}) 14 # target_compile_options(${testname} PRIVATE -fsanitize=fuzzer) 15endforeach()