Merge topic 'vs-global-props-for-all-targets'

36489b85aa VS: Add test for CMAKE_VS_GLOBALS
22e670a306 VS: Add option to set VS_GLOBAL_* for all targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2345
This commit is contained in:
Brad King
2018-09-28 15:13:52 +00:00
committed by Kitware Robot
7 changed files with 106 additions and 0 deletions
+1
View File
@@ -395,6 +395,7 @@ Variables that Control the Build
/variable/CMAKE_TRY_COMPILE_TARGET_TYPE
/variable/CMAKE_USE_RELATIVE_PATHS
/variable/CMAKE_VISIBILITY_INLINES_HIDDEN
/variable/CMAKE_VS_GLOBALS
/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
/variable/CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
/variable/CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
@@ -0,0 +1,6 @@
vs-global-props-for-all-targets
-------------------------------
* A :variable:`CMAKE_VS_GLOBALS` variable was added to initialize
:prop_tgt:`VS_GLOBAL_<variable>` target properties on targets as
they are created.
+21
View File
@@ -0,0 +1,21 @@
CMAKE_VS_GLOBALS
----------------
List of ``Key=Value`` records to be set per target as target properties
:prop_tgt:`VS_GLOBAL_<variable>` with ``variable=Key`` and value ``Value``.
For example:
.. code-block:: cmake
set(CMAKE_VS_GLOBALS
"DefaultLanguage=en-US"
"MinimumVisualStudioVersion=14.0"
)
will set properties ``VS_GLOBAL_DefaultLanguage`` to ``en-US`` and
``VS_GLOBAL_MinimumVisualStudioVersion`` to ``14.0`` for all targets
(except for ``INTERFACE`` libraries).
This variable is meant to be set by a
:variable:`toolchain file <CMAKE_TOOLCHAIN_FILE>`.