mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 12:18:36 -06:00
CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'
Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument
unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2). It
broke existing projects that were silently tolerating unrelated unused
arguments in their checks for C and CXX. For example, using
`CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be
used when driving the linker as well, and Clang warns they are unused in
that case.
Add a test case covering the now-restored behavior.
Fixes: #24591
This commit is contained in:
@@ -12,7 +12,6 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR)
|
||||
FAIL_REGEX "switch .* is no longer supported" # GNU
|
||||
FAIL_REGEX "unknown .*option" # Clang
|
||||
FAIL_REGEX "optimization flag .* not supported" # Clang
|
||||
FAIL_REGEX "argument unused during compilation: .*" # Clang
|
||||
FAIL_REGEX "unknown argument ignored" # Clang (cl)
|
||||
FAIL_REGEX "ignoring unknown option" # MSVC, Intel
|
||||
FAIL_REGEX "warning D9002" # MSVC, any lang
|
||||
|
||||
Reference in New Issue
Block a user