diff options
Diffstat (limited to 'fuzzers')
-rw-r--r-- | fuzzers/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fuzzers/CMakeLists.txt b/fuzzers/CMakeLists.txt index 1c03aa980..59eca24d0 100644 --- a/fuzzers/CMakeLists.txt +++ b/fuzzers/CMakeLists.txt @@ -9,6 +9,8 @@ ENDIF () FILE(GLOB SRC_FUZZ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *_fuzzer.c) FOREACH(fuzz_target_src ${SRC_FUZZ}) STRING(REPLACE ".c" "" fuzz_target_name ${fuzz_target_src}) + STRING(REPLACE "_fuzzer" "" fuzz_name ${fuzz_target_name}) + SET(${fuzz_target_name}_SOURCES ${fuzz_target_src} ${LIBGIT2_OBJECTS}) IF(USE_STANDALONE_FUZZERS) LIST(APPEND ${fuzz_target_name}_SOURCES "standalone_driver.c") @@ -16,4 +18,6 @@ FOREACH(fuzz_target_src ${SRC_FUZZ}) ADD_EXECUTABLE(${fuzz_target_name} ${${fuzz_target_name}_SOURCES}) SET_TARGET_PROPERTIES(${fuzz_target_name} PROPERTIES C_STANDARD 90) TARGET_LINK_LIBRARIES(${fuzz_target_name} ${LIBGIT2_LIBS}) + + ADD_TEST(${fuzz_target_name} "${CMAKE_CURRENT_BINARY_DIR}/${fuzz_target_name}" "${CMAKE_CURRENT_SOURCE_DIR}/corpora/${fuzz_name}") ENDFOREACH() |