Skip to content
Snippets Groups Projects
Commit bbe29710 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'gcc11-errors'


701773f1 CheckCompilerFlag: Handle -Werror= for GCC 11

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !6242
parents 5ef8c09a 701773f1
No related branches found
No related tags found
No related merge requests found
......@@ -13,10 +13,12 @@ function(CMAKE_CHECK_COMPILER_FLAG _lang _flag _var)
if(_lang STREQUAL "C")
set(_lang_src "int main(void) { return 0; }")
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C")
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C"
FAIL_REGEX "-Werror=.* argument .* is not valid for C")
elseif(_lang STREQUAL "CXX")
set(_lang_src "int main() { return 0; }")
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+")
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+"
FAIL_REGEX "-Werror=.* argument .* is not valid for C\\+\\+")
elseif(_lang STREQUAL "CUDA")
set(_lang_src "__host__ int main() { return 0; }")
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+" # Host GNU
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment