[cmake] Introduce a target for building fuzzing tests

Part of #5063
This commit is contained in:
Sergey Bronnikov
2023-05-31 19:55:26 +03:00
committed by akallabeth
parent 2b7f09ea3c
commit 1c0c804981
2 changed files with 4 additions and 0 deletions

View File

@@ -26,6 +26,9 @@ set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
add_custom_target(fuzzers
COMMENT "Build fuzzers")
if(NOT DEFINED VENDOR)
set(VENDOR "FreeRDP" CACHE STRING "FreeRDP package vendor")
endif()

View File

@@ -38,6 +38,7 @@ if (BUILD_FUZZERS)
target_link_libraries(${TestName} freerdp winpr freerdp-client fuzzer_config)
add_test(${TestName} ${TESTING_OUTPUT_DIRECTORY}/${MODULE_NAME} ${TestName})
set_target_properties(${TestName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
add_dependencies(fuzzers ${TestName})
endforeach()
endif (BUILD_FUZZERS)