From 88ee6800c9686931a1550b41fa634b0c6c3988a7 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:38:55 +0000 Subject: [PATCH] cmake: Delete `check_cxx_source_links_with_flags` macro --- CMakeLists.txt | 2 +- cmake/module/CheckSourceCompilesAndLinks.cmake | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) 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}")