diff --git a/CMakeLists.txt b/CMakeLists.txt index 279c3627913..86edfb628fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -387,7 +387,7 @@ target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS}) if(BUILD_FUZZ_BINARY) include(CheckSourceCompilesAndLinks) - check_cxx_source_links_with_flags("${SANITIZER_LDFLAGS}" " + check_cxx_source_compiles_with_flags("${SANITIZER_LDFLAGS}" " #include #include extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } diff --git a/cmake/module/CheckSourceCompilesAndLinks.cmake b/cmake/module/CheckSourceCompilesAndLinks.cmake index 53d0617a905..7a2751c2c7d 100644 --- a/cmake/module/CheckSourceCompilesAndLinks.cmake +++ b/cmake/module/CheckSourceCompilesAndLinks.cmake @@ -14,14 +14,6 @@ macro(check_cxx_source_compiles_with_flags flags source) cmake_pop_check_state() endmacro() -macro(check_cxx_source_links_with_flags flags source) - cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_FLAGS ${flags}) - list(JOIN CMAKE_REQUIRED_FLAGS " " CMAKE_REQUIRED_FLAGS) - check_cxx_source_compiles("${source}" ${ARGN}) - cmake_pop_check_state() -endmacro() - macro(check_cxx_source_links_with_libs libs source) cmake_push_check_state(RESET) set(CMAKE_REQUIRED_LIBRARIES "${libs}")