Skip to content

Add fuzz_test_properties for common target options for fuzz executables #1708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/libbson/fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
add_executable(fuzz_test_init_from_json EXCLUDE_FROM_ALL
fuzz_test_init_from_json.c)
target_link_libraries(fuzz_test_init_from_json PRIVATE bson_static)
set_property(TARGET fuzz_test_init_from_json APPEND PROPERTY LINK_OPTIONS -fsanitize=fuzzer)
add_library(fuzz_test_properties INTERFACE)
target_link_libraries(fuzz_test_properties INTERFACE bson_static)
set_property(TARGET fuzz_test_properties APPEND PROPERTY INTERFACE_LINK_OPTIONS -fsanitize=fuzzer)

add_executable(fuzz_test_validate EXCLUDE_FROM_ALL
fuzz_test_validate.c)
target_link_libraries(fuzz_test_validate PRIVATE bson_static)
set_property(TARGET fuzz_test_validate APPEND PROPERTY LINK_OPTIONS -fsanitize=fuzzer)
add_executable(fuzz_test_init_from_json EXCLUDE_FROM_ALL fuzz_test_init_from_json.c)
target_link_libraries(fuzz_test_init_from_json PRIVATE fuzz_test_properties)

add_executable(fuzz_test_validate EXCLUDE_FROM_ALL fuzz_test_validate.c)
target_link_libraries(fuzz_test_validate PRIVATE fuzz_test_properties)