summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-13 16:15:57 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-13 16:46:23 (GMT)
commitc00a6d3967be94a1cd8dfa369d834feea3e91725 (patch)
tree00c24f1df5da1a20f8abe03bb387609a24507304 /Source/cmPolicies.h
parent6114c8e994761ae4873218499a951136a4cdd855 (diff)
downloadCMake-c00a6d3967be94a1cd8dfa369d834feea3e91725.zip
CMake-c00a6d3967be94a1cd8dfa369d834feea3e91725.tar.gz
CMake-c00a6d3967be94a1cd8dfa369d834feea3e91725.tar.bz2
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
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 5ef0ff7..30cd4b7 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -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)