diff options
author | Brad King <brad.king@kitware.com> | 2020-11-20 15:15:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-11-20 15:15:53 (GMT) |
commit | 3bc549540e117a949707c51fcdf110fdc51e3d93 (patch) | |
tree | e736abff616bf3c411881074a156fdae490f6f71 /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | 64dc4efc511f766d0a099df717e2f35f9eccabce (diff) | |
parent | bf241bcc1e5cda69775c05022e146a7f4f76b41b (diff) | |
download | CMake-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.cxx | 12 |
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)); } } |