summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-20 15:15:53 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-20 15:15:53 (GMT)
commit3bc549540e117a949707c51fcdf110fdc51e3d93 (patch)
treee736abff616bf3c411881074a156fdae490f6f71 /Source/cmGlobalUnixMakefileGenerator3.cxx
parent64dc4efc511f766d0a099df717e2f35f9eccabce (diff)
parentbf241bcc1e5cda69775c05022e146a7f4f76b41b (diff)
downloadCMake-3bc549540e117a949707c51fcdf110fdc51e3d93.zip
CMake-3bc549540e117a949707c51fcdf110fdc51e3d93.tar.gz
CMake-3bc549540e117a949707c51fcdf110fdc51e3d93.tar.bz2
Merge branch 'master' into FindGTest-revert-no-release
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 2c934e1..9c3a533 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -589,10 +589,16 @@ cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(
}
makeCommand.Add(this->SelectMakeProgram(makeProgram));
+ // Explicitly tell the make tool to use the Makefile written by
+ // cmLocalUnixMakefileGenerator3::WriteLocalMakefile
+ makeCommand.Add("-f");
+ makeCommand.Add("Makefile");
+
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
- makeCommand.Add("-j");
- if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
- makeCommand.Add(std::to_string(jobs));
+ if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
+ makeCommand.Add("-j");
+ } else {
+ makeCommand.Add("-j" + std::to_string(jobs));
}
}