summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-02-04 19:12:01 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-02-04 19:13:07 (GMT)
commit2ac835b9f9a7a4dec16c498a51c0dbc3d64844bc (patch)
tree9b52bf9b0a2ba5a32b87579fe184dadea3443318 /Source/cmGlobalGenerator.cxx
parent28013c9434b748c5009061844f19b29f0d482c9e (diff)
downloadCMake-2ac835b9f9a7a4dec16c498a51c0dbc3d64844bc.zip
CMake-2ac835b9f9a7a4dec16c498a51c0dbc3d64844bc.tar.gz
CMake-2ac835b9f9a7a4dec16c498a51c0dbc3d64844bc.tar.bz2
Refactor: Allow generators to decide default configuration for build
And allow them to read any cache values they need.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1f084f5..7ddeb99 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1878,6 +1878,10 @@ int cmGlobalGenerator::Build(
output += "\n";
return 1;
}
+ std::string realConfig = config;
+ if (realConfig.empty()) {
+ realConfig = this->GetDefaultBuildConfig();
+ }
int retVal = 0;
cmSystemTools::SetRunCommandHideConsole(true);
@@ -1886,7 +1890,7 @@ int cmGlobalGenerator::Build(
std::vector<GeneratedMakeCommand> makeCommand =
this->GenerateBuildCommand(makeCommandCSTR, projectName, bindir, targets,
- config, fast, jobs, verbose, nativeOptions);
+ realConfig, fast, jobs, verbose, nativeOptions);
// Workaround to convince some commands to produce output.
if (outputflag == cmSystemTools::OUTPUT_PASSTHROUGH &&
@@ -1898,7 +1902,7 @@ int cmGlobalGenerator::Build(
if (clean) {
std::vector<GeneratedMakeCommand> cleanCommand =
this->GenerateBuildCommand(makeCommandCSTR, projectName, bindir,
- { "clean" }, config, fast, jobs, verbose);
+ { "clean" }, realConfig, fast, jobs, verbose);
output += "\nRun Clean Command:";
output += cleanCommand.front().Printable();
output += "\n";