summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorCarsten Rudolph <18394207+crud89@users.noreply.github.com>2022-01-22 09:29:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-22 11:35:41 (GMT)
commitb2f8f0bb87b3b49a39d1db4333bffc5405166245 (patch)
treebbead21bb96a02373d752526f275eb503bd1a803 /Help
parent193b8fca52b5665387dbc7f3199981d9e6cd4b79 (diff)
downloadCMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.zip
CMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.tar.gz
CMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.tar.bz2
cmGlobalVisualStudio10Generator: Auto restore NuGet packages.
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/manual/cmake.1.rst11
-rw-r--r--Help/release/dev/vs-package-restore.rst10
-rw-r--r--Help/variable/CMAKE_VS_NUGET_PACKAGE_RESTORE.rst22
4 files changed, 44 insertions, 0 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 51b092f..8c43c22 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -119,6 +119,7 @@ Variables that Provide Information
/variable/CMAKE_VS_DEVENV_COMMAND
/variable/CMAKE_VS_MSBUILD_COMMAND
/variable/CMAKE_VS_NsightTegra_VERSION
+ /variable/CMAKE_VS_NUGET_PACKAGE_RESTORE
/variable/CMAKE_VS_PLATFORM_NAME
/variable/CMAKE_VS_PLATFORM_NAME_DEFAULT
/variable/CMAKE_VS_PLATFORM_TOOLSET
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 04e2eda..1d638b9 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -463,6 +463,17 @@ following options:
Build target ``clean`` first, then build.
(To clean only, use ``--target clean``.)
+``--resolve-package-references=<on|off|only>``
+ .. versionadded:: 3.23
+
+ Resolve remote package references (e.g. NuGet packages) before build.
+ When set to ``on`` (default), packages will be restored before building a
+ target. When set to ``only``, the packages will be restored, but no build
+ will be performed. When set to ``off``, no packages will be restored.
+
+ If the target does not define any package references, this option does
+ nothing.
+
``--use-stderr``
Ignored. Behavior is default in CMake >= 3.0.
diff --git a/Help/release/dev/vs-package-restore.rst b/Help/release/dev/vs-package-restore.rst
new file mode 100644
index 0000000..697778f
--- /dev/null
+++ b/Help/release/dev/vs-package-restore.rst
@@ -0,0 +1,10 @@
+vs-package-restore
+------------------
+
+* Targets with :prop_tgt:`VS_PACKAGE_REFERENCES` will now automatically attempt
+ to restore the package references from NuGet. The cache variable
+ :variable:`CMAKE_VS_NUGET_PACKAGE_RESTORE` was added to toggle automatic
+ package restore off.
+
+* :manual:`cmake(1)` gained the ``--resolve-package-references=<on|off|only>``
+ command-line option to control automatic package restoration.
diff --git a/Help/variable/CMAKE_VS_NUGET_PACKAGE_RESTORE.rst b/Help/variable/CMAKE_VS_NUGET_PACKAGE_RESTORE.rst
new file mode 100644
index 0000000..7160726
--- /dev/null
+++ b/Help/variable/CMAKE_VS_NUGET_PACKAGE_RESTORE.rst
@@ -0,0 +1,22 @@
+CMAKE_VS_NUGET_PACKAGE_RESTORE
+------------------------------
+
+.. versionadded:: 3.23
+
+When using a Visual Studio generator, this cache variable controls
+if msbuild should automatically attempt to restore NuGet packages
+prior to a build. NuGet packages can be defined using the
+:prop_tgt:`VS_PACKAGE_REFERENCES` property on a target. If no
+package references are defined, this setting will do nothing.
+
+The command line option ``--resolve-package-references`` can be used
+alternatively to control the resolve behavior globally. This option
+will take precedence over the cache variable.
+
+Targets that use the :prop_tgt:`DOTNET_SDK` are required to run a
+restore before building. Disabling this option may cause the build
+to fail in such projects.
+
+This setting is stored as a cache entry. Default value is ``ON``.
+
+See also the :prop_tgt:`VS_PACKAGE_REFERENCES` property.