summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-16 14:40:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-16 14:41:03 (GMT)
commit731bdec8b9a752772e35ca9563cfcd91d53f4e49 (patch)
treeb2f795e2e14640a6f98ccec777268e0e26b4bc8e /Source/cmake.cxx
parent1c62bf6a6d415e7515463b406160029e31a10ead (diff)
parentd92469e57210d6b4e9a2733d3477ae44a6cf9735 (diff)
downloadCMake-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 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 85ac9ca..907b2d0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3356,7 +3356,8 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
buildOptions.Clean = *expandedPreset->CleanFirst;
}
- if (expandedPreset->ResolvePackageReferences) {
+ if (buildOptions.ResolveMode == PackageResolveMode::Default &&
+ expandedPreset->ResolvePackageReferences) {
buildOptions.ResolveMode = *expandedPreset->ResolvePackageReferences;
}