From f745e0497ee71d35fd1b3524b1636a72da76c266 Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Mon, 3 Jan 2022 09:35:16 +1100 Subject: CheckCompilerFlags: Catch linker warning about ignored flags Example warning from arm64 macOS that this will now catch: ld: warning: -no_pie ignored for arm64 Fixes: #22961 --- Modules/CMakeCheckCompilerFlagCommonPatterns.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake index bda1d71..8f59acd 100644 --- a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake +++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake @@ -13,6 +13,7 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR) FAIL_REGEX "unknown .*option" # Clang FAIL_REGEX "optimization flag .* not supported" # Clang FAIL_REGEX "unknown argument ignored" # Clang (cl) + FAIL_REGEX "warning: .* ignored" # Clang (linker) FAIL_REGEX "ignoring unknown option" # MSVC, Intel FAIL_REGEX "warning D9002" # MSVC, any lang FAIL_REGEX "option.*not supported" # Intel -- cgit v0.12