Skip to content
Snippets Groups Projects
Commit 1baf122c authored by Brad King's avatar Brad King
Browse files

MSVC: Do not add /W3 to CMAKE_<LANG>_FLAGS by default

We do not add default warning flags on other compilers, and having
a warning flag in the default flags makes it hard for projects to
customize the warning level.  They need to use string processing
to remove `/W3` from `CMAKE_{C,CXX}_FLAGS`.  Therefore we should
drop it.

However, projects may be using string processing to replace `/W3`
with another flag, so we cannot simply drop it.  Add a policy to
drop it in a compatible way.

Fixes: #18317
parent 85421526
No related branches found
No related tags found
No related merge requests found
Showing
with 109 additions and 5 deletions
Loading
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