diff options
author | Brad King <brad.king@kitware.com> | 2019-04-10 17:38:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-17 15:00:44 (GMT) |
commit | fb3370b6a1681190ffd8daf63975c44ce8fc1c49 (patch) | |
tree | 1e837d6bb039320c6f38c60b69c9439abc720e5f /Help/prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt | |
parent | f621e7fa5df8d35cc379f9f7825f3d75b8489876 (diff) | |
download | CMake-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 'Help/prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt')
-rw-r--r-- | Help/prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Help/prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt b/Help/prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt new file mode 100644 index 0000000..2bf71a9 --- /dev/null +++ b/Help/prop_tgt/MSVC_RUNTIME_LIBRARY-VALUES.txt @@ -0,0 +1,15 @@ +``MultiThreaded`` + Compile with ``-MT`` or equivalent flag(s) to use a multi-threaded + statically-linked runtime library. +``MultiThreadedDLL`` + Compile with ``-MD`` or equivalent flag(s) to use a multi-threaded + dynamically-linked runtime library. +``MultiThreadedDebug`` + Compile with ``-MTd`` or equivalent flag(s) to use a multi-threaded + statically-linked runtime library. +``MultiThreadedDebugDLL`` + Compile with ``-MDd`` or equivalent flag(s) to use a multi-threaded + dynamically-linked runtime library. + +The value is ignored on non-MSVC compilers but an unsupported value will +be rejected as an error when using a compiler targeting the MSVC ABI. |