summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorCarsten Rudolph <18394207+crud89@users.noreply.github.com>2022-01-21 16:43:17 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-22 11:35:38 (GMT)
commit193b8fca52b5665387dbc7f3199981d9e6cd4b79 (patch)
treee3a5d14692f37645b9b7a03fc240dd0f25bace48 /Source/cmGlobalGenerator.cxx
parent6a1010349355354e27015a004f5620b77993b91c (diff)
downloadCMake-193b8fca52b5665387dbc7f3199981d9e6cd4b79.zip
CMake-193b8fca52b5665387dbc7f3199981d9e6cd4b79.tar.gz
CMake-193b8fca52b5665387dbc7f3199981d9e6cd4b79.tar.bz2
cmBuildOptions: Split build arguments into separate object.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6433681..8559aba 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1994,16 +1994,19 @@ int cmGlobalGenerator::TryCompile(int jobs, const std::string& srcdir,
}
std::string config =
mf->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
+ cmBuildOptions defaultBuildOptions(false, fast);
+
return this->Build(jobs, srcdir, bindir, projectName, newTarget, output, "",
- config, false, fast, false, this->TryCompileTimeout);
+ config, defaultBuildOptions, false,
+ this->TryCompileTimeout);
}
std::vector<cmGlobalGenerator::GeneratedMakeCommand>
cmGlobalGenerator::GenerateBuildCommand(
const std::string& /*unused*/, const std::string& /*unused*/,
const std::string& /*unused*/, std::vector<std::string> const& /*unused*/,
- const std::string& /*unused*/, bool /*unused*/, int /*unused*/,
- bool /*unused*/, std::vector<std::string> const& /*unused*/)
+ const std::string& /*unused*/, int /*unused*/, bool /*unused*/,
+ const cmBuildOptions& /*unused*/, std::vector<std::string> const& /*unused*/)
{
GeneratedMakeCommand makeCommand;
makeCommand.Add("cmGlobalGenerator::GenerateBuildCommand not implemented");
@@ -2021,7 +2024,7 @@ int cmGlobalGenerator::Build(
int jobs, const std::string& /*unused*/, const std::string& bindir,
const std::string& projectName, const std::vector<std::string>& targets,
std::string& output, const std::string& makeCommandCSTR,
- const std::string& config, bool clean, bool fast, bool verbose,
+ const std::string& config, const cmBuildOptions& buildOptions, bool verbose,
cmDuration timeout, cmSystemTools::OutputOption outputflag,
std::vector<std::string> const& nativeOptions)
{
@@ -2053,9 +2056,9 @@ int cmGlobalGenerator::Build(
std::string outputBuffer;
std::string* outputPtr = &outputBuffer;
- std::vector<GeneratedMakeCommand> makeCommand =
- this->GenerateBuildCommand(makeCommandCSTR, projectName, bindir, targets,
- realConfig, fast, jobs, verbose, nativeOptions);
+ std::vector<GeneratedMakeCommand> makeCommand = this->GenerateBuildCommand(
+ makeCommandCSTR, projectName, bindir, targets, realConfig, jobs, verbose,
+ buildOptions, nativeOptions);
// Workaround to convince some commands to produce output.
if (outputflag == cmSystemTools::OUTPUT_PASSTHROUGH &&
@@ -2064,10 +2067,11 @@ int cmGlobalGenerator::Build(
}
// should we do a clean first?
- if (clean) {
+ if (buildOptions.Clean) {
std::vector<GeneratedMakeCommand> cleanCommand =
this->GenerateBuildCommand(makeCommandCSTR, projectName, bindir,
- { "clean" }, realConfig, fast, jobs, verbose);
+ { "clean" }, realConfig, jobs, verbose,
+ buildOptions);
output += "\nRun Clean Command:";
output += cleanCommand.front().Printable();
output += "\n";