diff options
author | Brad King <brad.king@kitware.com> | 2022-02-16 14:40:57 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-02-16 14:41:03 (GMT) |
commit | 731bdec8b9a752772e35ca9563cfcd91d53f4e49 (patch) | |
tree | b2f795e2e14640a6f98ccec777268e0e26b4bc8e /Help/manual | |
parent | 1c62bf6a6d415e7515463b406160029e31a10ead (diff) | |
parent | d92469e57210d6b4e9a2733d3477ae44a6cf9735 (diff) | |
download | CMake-731bdec8b9a752772e35ca9563cfcd91d53f4e49.zip CMake-731bdec8b9a752772e35ca9563cfcd91d53f4e49.tar.gz CMake-731bdec8b9a752772e35ca9563cfcd91d53f4e49.tar.bz2 |
Merge topic 'vs-package-restore-docs'
d92469e572 Help: Clarify how package resolve mode is intended to be used
f320a31087 cmake --build: prioritize --resolve-package-references over preset
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6984
Diffstat (limited to 'Help/manual')
-rw-r--r-- | Help/manual/cmake-presets.7.rst | 28 | ||||
-rw-r--r-- | Help/manual/cmake.1.rst | 21 |
2 files changed, 24 insertions, 25 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index 31bd9c0..69d0543 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -479,9 +479,10 @@ that may contain the following fields: An optional string that specifies the package resolve mode. This is allowed in preset files specifying version ``4`` or above. - This field overwrites the ``--resolve-package-references`` command line - parameter. If there are no targets that define package references, this - option does nothing. Valid values are: + Package references are used to define dependencies to packages from + external package managers. Currently only NuGet in combination with the + Visual Studio generator is supported. If there are no targets that define + package references, this option does nothing. Valid values are: ``on`` @@ -498,17 +499,16 @@ that may contain the following fields: .. note:: - If this setting is not specified in a preset, CMake will instead - use the setting specified by the ``--resolve-package-references`` - command line parameter. If the command line parameter is not - provided either, an environment-specific cache variable will be - evaluated to decide, if package restoration should be performed. - - When using the Visual Studio generator, package references are - defined using the :prop_tgt:`VS_PACKAGE_REFERENCES` property. - Package references are restored using NuGet. It can be disabled - by setting the ``CMAKE_VS_NUGET_PACKAGE_RESTORE`` variable to - ``OFF``. This can also be done from within a configure preset. + The command line parameter ``--resolve-package-references`` will take + priority over this setting. If the command line parameter is not provided + and this setting is not specified, an environment-specific cache variable + will be evaluated to decide, if package restoration should be performed. + + When using the Visual Studio generator, package references are defined + using the :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references + are restored using NuGet. It can be disabled by setting the + ``CMAKE_VS_NUGET_PACKAGE_RESTORE`` variable to ``OFF``. This can also be + done from within a configure preset. ``verbose`` diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index a584141..3c4e76a 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -480,21 +480,20 @@ following options: ``--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. + Resolve remote package references from external package managers (e.g. NuGet) + 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. + If the target does not define any package references, this option does nothing. This setting can be specified in a build preset (using - ``resolvePackageReferences``). In this case, the command line option will - be ignored. + ``resolvePackageReferences``). The preset setting will be ignored, if this + command line option is specified. - If the no command line parameter or preset option is not provided, an - environment-specific cache variable will be evaluated to decide, if package - restoration should be performed. + If no command line parameter or preset option are provided, an environment- + specific cache variable will be evaluated to decide, if package restoration + should be performed. When using the Visual Studio generator, package references are defined using the :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references |