summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-10 17:38:41 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-17 15:00:44 (GMT)
commitfb3370b6a1681190ffd8daf63975c44ce8fc1c49 (patch)
tree1e837d6bb039320c6f38c60b69c9439abc720e5f /Source/cmPolicies.h
parentf621e7fa5df8d35cc379f9f7825f3d75b8489876 (diff)
downloadCMake-fb3370b6a1681190ffd8daf63975c44ce8fc1c49.zip
CMake-fb3370b6a1681190ffd8daf63975c44ce8fc1c49.tar.gz
CMake-fb3370b6a1681190ffd8daf63975c44ce8fc1c49.tar.bz2
MSVC: Add abstraction for runtime library selection
Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class abstraction to select the runtime library from an enumeration of logical names. We've long hesitated to do this because the idea of "runtime library selection" touches on related concepts on several platforms. Avoid that scope creep by simply defining an abstraction that applies only when targeting the MSVC ABI on Windows. Removing the old default flags requires a policy because existing projects may rely on string processing to edit them and choose a runtime library under the old behavior. Add policy CMP0091 to provide compatibility. Fixes: #19108
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 02a6295..113dd35 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -267,7 +267,10 @@ class cmMakefile;
15, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0090, \
"export(PACKAGE) does not populate package registry by default.", 3, \
- 15, 0, cmPolicies::WARN)
+ 15, 0, cmPolicies::WARN) \
+ SELECT(POLICY, CMP0091, \
+ "MSVC runtime library flags are selected by an abstraction.", 3, 15, \
+ 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \