summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-24 16:46:15 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-01-24 16:46:29 (GMT)
commit63154cbf4501e11cae281eccbbdf9eceb453dae1 (patch)
treebe8490cf000e62f532a40fb37f652f9f4e7e477e /Source/cmake.cxx
parent25441f26171531ff114f3b9a6fad6ee2edc7ef29 (diff)
parent9aa7831f05e924830848822aecdb43aa7261bc11 (diff)
downloadCMake-63154cbf4501e11cae281eccbbdf9eceb453dae1.zip
CMake-63154cbf4501e11cae281eccbbdf9eceb453dae1.tar.gz
CMake-63154cbf4501e11cae281eccbbdf9eceb453dae1.tar.bz2
Merge topic 'vs-package-restore'
9aa7831f05 Presets: add resolve packages setting to build presets. b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages. 193b8fca52 cmBuildOptions: Split build arguments into separate object. 6a10103493 Help: Update preset schema description for version 3 entries. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6761
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 72b26e1..ef4e37b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -28,6 +28,7 @@
#include "cm_sys_stat.h"
+#include "cmBuildOptions.h"
#include "cmCMakePath.h"
#include "cmCMakePresetsGraph.h"
#include "cmCommandLineArgument.h"
@@ -3244,8 +3245,8 @@ std::vector<std::string> cmake::GetDebugConfigs()
int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
std::string config, std::vector<std::string> nativeOptions,
- bool clean, bool verbose, const std::string& presetName,
- bool listPresets)
+ cmBuildOptions& buildOptions, bool verbose,
+ const std::string& presetName, bool listPresets)
{
this->SetHomeDirectory("");
this->SetHomeOutputDirectory("");
@@ -3351,8 +3352,12 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
config = expandedPreset->Configuration;
}
- if (!clean && expandedPreset->CleanFirst) {
- clean = *expandedPreset->CleanFirst;
+ if (!buildOptions.Clean && expandedPreset->CleanFirst) {
+ buildOptions.Clean = *expandedPreset->CleanFirst;
+ }
+
+ if (expandedPreset->ResolvePackageReferences) {
+ buildOptions.ResolveMode = *expandedPreset->ResolvePackageReferences;
}
if (!verbose && expandedPreset->Verbose) {
@@ -3491,7 +3496,7 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
this->GlobalGenerator->PrintBuildCommandAdvice(std::cerr, jobs);
return this->GlobalGenerator->Build(
- jobs, "", dir, projName, targets, output, "", config, clean, false,
+ jobs, "", dir, projName, targets, output, "", config, buildOptions,
verbose, cmDuration::zero(), cmSystemTools::OUTPUT_PASSTHROUGH,
nativeOptions);
}