2 Commits

Author SHA1 Message Date
Brad King
282d9f3168 MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set
By default `CMAKE_MSVC_RUNTIME_LIBRARY` is not set.  Document the
default runtime library selection in that case.  We already test it.
2019-07-19 11:17:32 -04:00
Brad King
fb3370b6a1 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
2019-04-17 11:00:44 -04:00