mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 12:59:55 -05:00
MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
The `/GR` flag has been on by default since MSVC cl 14.0 from VS 2005. Remove it from the default flags to make it easier for projects to pass `/GR-` themselves to turn it off. Projects may be using string processing to replace `/GR` with another flag, so we cannot simply drop it. Add a policy to drop it in a compatible way. Fixes: #21428
This commit is contained in:
@@ -345,6 +345,9 @@ class cmMakefile;
|
||||
0, cmPolicies::WARN) \
|
||||
SELECT(POLICY, CMP0116, \
|
||||
"Ninja generators transform DEPFILEs from add_custom_command().", 3, \
|
||||
20, 0, cmPolicies::WARN) \
|
||||
SELECT(POLICY, CMP0117, \
|
||||
"MSVC RTTI flag /GR is not added to CMAKE_CXX_FLAGS by default.", 3, \
|
||||
20, 0, cmPolicies::WARN)
|
||||
|
||||
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
|
||||
|
||||
Reference in New Issue
Block a user