diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-properties.7.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/prop_tgt/VS_USE_DEBUG_LIBRARIES-PURPOSE.txt | 18 | ||||
-rw-r--r-- | Help/prop_tgt/VS_USE_DEBUG_LIBRARIES.rst | 27 | ||||
-rw-r--r-- | Help/release/dev/vs-UseDebugLibraries.rst | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_VS_USE_DEBUG_LIBRARIES.rst | 28 |
6 files changed, 81 insertions, 0 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 0d1046a..8d2d202 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -445,6 +445,7 @@ Properties on Targets /prop_tgt/VS_SDK_REFERENCES /prop_tgt/VS_SOLUTION_DEPLOY /prop_tgt/VS_SOURCE_SETTINGS_tool + /prop_tgt/VS_USE_DEBUG_LIBRARIES /prop_tgt/VS_USER_PROPS /prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION /prop_tgt/VS_WINRT_COMPONENT diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 8a5ab30..c7efdcf 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -137,6 +137,7 @@ Variables that Provide Information /variable/CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER /variable/CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION /variable/CMAKE_VS_TARGET_FRAMEWORK_VERSION + /variable/CMAKE_VS_USE_DEBUG_LIBRARIES /variable/CMAKE_VS_VERSION_BUILD_NUMBER /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION diff --git a/Help/prop_tgt/VS_USE_DEBUG_LIBRARIES-PURPOSE.txt b/Help/prop_tgt/VS_USE_DEBUG_LIBRARIES-PURPOSE.txt new file mode 100644 index 0000000..8d3714e --- /dev/null +++ b/Help/prop_tgt/VS_USE_DEBUG_LIBRARIES-PURPOSE.txt @@ -0,0 +1,18 @@ +Indicate to :ref:`Visual Studio Generators` what configurations are considered +debug configurations. This controls the ``UseDebugLibraries`` setting in +each configuration of a ``.vcxproj`` file. + +The "Use Debug Libraries" setting in Visual Studio projects, despite its +specific-sounding name, is a general-purpose indicator of what configurations +are considered debug configurations. In standalone projects, this may affect +MSBuild's default selection of MSVC runtime library, optimization flags, +runtime checks, and similar settings. In CMake projects those settings are +typically generated explicitly based on the project's specification, e.g., +the MSVC runtime library is controlled by |MSVC_RUNTIME_LIBRARY|. However, +the ``UseDebugLibraries`` indicator is useful for reference by both humans +and tools, and may also affect the behavior of platform-specific SDKs. + +Set |VS_USE_DEBUG_LIBRARIES| to a true or false value to indicate whether +each configuration is considered a debug configuration. The value may also +be the empty string (``""``) in which case no ``UseDebugLibraries`` will be +added explicitly by CMake, and MSBuild will use its default value, ``false``. diff --git a/Help/prop_tgt/VS_USE_DEBUG_LIBRARIES.rst b/Help/prop_tgt/VS_USE_DEBUG_LIBRARIES.rst new file mode 100644 index 0000000..78ad36a --- /dev/null +++ b/Help/prop_tgt/VS_USE_DEBUG_LIBRARIES.rst @@ -0,0 +1,27 @@ +VS_USE_DEBUG_LIBRARIES +---------------------- + +.. versionadded:: 3.30 + +.. |VS_USE_DEBUG_LIBRARIES| replace:: ``VS_USE_DEBUG_LIBRARIES`` +.. |MSVC_RUNTIME_LIBRARY| replace:: :prop_tgt:`MSVC_RUNTIME_LIBRARY` + +.. include:: VS_USE_DEBUG_LIBRARIES-PURPOSE.txt + +Use :manual:`generator expressions <cmake-generator-expressions(7)>` +for per-configuration specification. For example, the code: + +.. code-block:: cmake + + add_executable(foo foo.c) + set_property(TARGET foo PROPERTY + VS_USE_DEBUG_LIBRARIES "$<CONFIG:Debug,Custom>") + +indicates that target ``foo`` considers its "Debug" and "Custom" +configurations to be debug configurations, and its other configurations +to be non-debug configurations. + +The property is initialized from the value of the +:variable:`CMAKE_VS_USE_DEBUG_LIBRARIES` variable, if it is set. +If the property is not set, then CMake does not generate any +``UseDebugLibraries`` indicator. diff --git a/Help/release/dev/vs-UseDebugLibraries.rst b/Help/release/dev/vs-UseDebugLibraries.rst new file mode 100644 index 0000000..477c385 --- /dev/null +++ b/Help/release/dev/vs-UseDebugLibraries.rst @@ -0,0 +1,6 @@ +vs-UseDebugLibraries +-------------------- + +* The :variable:`CMAKE_VS_USE_DEBUG_LIBRARIES` variable and corresponding + :prop_tgt:`VS_USE_DEBUG_LIBRARIES` target property were added to explicitly + control ``UseDebugLibraries`` indicators in ``.vcxproj`` files. diff --git a/Help/variable/CMAKE_VS_USE_DEBUG_LIBRARIES.rst b/Help/variable/CMAKE_VS_USE_DEBUG_LIBRARIES.rst new file mode 100644 index 0000000..45d3eff --- /dev/null +++ b/Help/variable/CMAKE_VS_USE_DEBUG_LIBRARIES.rst @@ -0,0 +1,28 @@ +CMAKE_VS_USE_DEBUG_LIBRARIES +---------------------------- + +.. versionadded:: 3.30 + +.. |VS_USE_DEBUG_LIBRARIES| replace:: ``CMAKE_VS_USE_DEBUG_LIBRARIES`` +.. |MSVC_RUNTIME_LIBRARY| replace:: :variable:`CMAKE_MSVC_RUNTIME_LIBRARY` + +.. include:: ../prop_tgt/VS_USE_DEBUG_LIBRARIES-PURPOSE.txt + +Use :manual:`generator expressions <cmake-generator-expressions(7)>` +for per-configuration specification. For example, the code: + +.. code-block:: cmake + + set(CMAKE_VS_USE_DEBUG_LIBRARIES "$<CONFIG:Debug,Custom>") + +indicates that all following targets consider their "Debug" and "Custom" +configurations to be debug configurations, and their other configurations +to be non-debug configurations. + +This variable is used to initialize the :prop_tgt:`VS_USE_DEBUG_LIBRARIES` +property on all targets as they are created. It is also propagated by +calls to the :command:`try_compile` command into its test project. + +If this variable is not set then the :prop_tgt:`VS_USE_DEBUG_LIBRARIES` +property will not be set automatically. If that property is not set +then CMake does not generate any ``UseDebugLibraries`` indicator. |