diff options
Diffstat (limited to 'Source/cmGlobalJOMMakefileGenerator.cxx')
-rw-r--r-- | Source/cmGlobalJOMMakefileGenerator.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 18c45e0..0f41ea1 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -52,3 +52,29 @@ void cmGlobalJOMMakefileGenerator::PrintCompilerAdvice( } this->cmGlobalUnixMakefileGenerator3::PrintCompilerAdvice(os, lang, envVar); } + +void cmGlobalJOMMakefileGenerator::GenerateBuildCommand( + std::vector<std::string>& makeCommand, const std::string& makeProgram, + const std::string& projectName, const std::string& projectDir, + const std::string& targetName, const std::string& config, bool fast, + int jobs, bool verbose, std::vector<std::string> const& makeOptions) +{ + std::vector<std::string> jomMakeOptions; + + // Since we have full control over the invocation of JOM, let us + // make it quiet. + jomMakeOptions.push_back(this->MakeSilentFlag); + jomMakeOptions.insert(jomMakeOptions.end(), makeOptions.begin(), + makeOptions.end()); + + // JOM does parallel builds by default, the -j is only needed if a specific + // number is given + // see https://github.com/qt-labs/jom/blob/v1.1.2/src/jomlib/options.cpp + if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) { + jobs = cmake::NO_BUILD_PARALLEL_LEVEL; + } + + cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( + makeCommand, makeProgram, projectName, projectDir, targetName, config, + fast, jobs, verbose, jomMakeOptions); +} |