cmake: Convert check_cxx_source_compiles_with_flags to a function

This commit is contained in:
Hennadii Stepanov committed 2025-02-20 12:39:03 +00:00
1 parent 88ee6800c9
commit 71bf8294a9
5 files changed
+48 -16

No files matched your search

+2 -1
View File
@@ -387,12 +387,13 @@ target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS})
if(BUILD_FUZZ_BINARY)
include(CheckSourceCompilesAndLinks)
check_cxx_source_compiles_with_flags("${SANITIZER_LDFLAGS}" "
check_cxx_source_compiles_with_flags("
#include <cstdint>
#include <cstddef>
extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; }
// No main() function.
" FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION
LDFLAGS ${SANITIZER_LDFLAGS}
)
endif()