diff --git a/cmake/CompileCheck.cmake b/cmake/CompileCheck.cmake index 4c02e66..bea01e0 100644 --- a/cmake/CompileCheck.cmake +++ b/cmake/CompileCheck.cmake @@ -131,7 +131,7 @@ function(check_flag RESULT FLAG TYPE) endfunction(check_flag) macro(strip_warning_flags VAR) - string(REGEX REPLACE "(^| )\\-(W[^ ]*|pedantic)" "" ${VAR} "${${VAR}}") + string(REGEX REPLACE "(^| )\\-(W[^ l][^ ]*|Wl[^,][^ ]*|pedantic)" "" ${VAR} "${${VAR}}") endmacro() function(check_builtin RESULT EXPR)