mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 20:29:56 -06:00
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
30 lines
642 B
C
30 lines
642 B
C
#ifdef VERIFY_DEBUG
|
|
# ifndef _DEBUG
|
|
# error "_DEBUG not defined by debug runtime library selection"
|
|
# endif
|
|
#else
|
|
# ifdef _DEBUG
|
|
# error "_DEBUG defined by non-debug runtime library selection"
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef VERIFY_DLL
|
|
# ifndef _DLL
|
|
# error "_DLL not defined by DLL runtime library selection"
|
|
# endif
|
|
#else
|
|
# ifdef _DLL
|
|
# error "_DLL defined by non-DLL runtime library selection"
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef VERIFY_MT
|
|
# ifndef _MT
|
|
# error "_MT not defined by multi-threaded runtime library selection"
|
|
# endif
|
|
#else
|
|
# ifdef _MT
|
|
# error "_MT defined by single-threaded runtime library selection"
|
|
# endif
|
|
#endif
|