diff options
Diffstat (limited to 'Source/cmGlobalNMakeMakefileGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNMakeMakefileGenerator.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index da683fb..eb66bd1 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -52,3 +52,40 @@ void cmGlobalNMakeMakefileGenerator::PrintCompilerAdvice( } this->cmGlobalUnixMakefileGenerator3::PrintCompilerAdvice(os, lang, envVar); } + +void cmGlobalNMakeMakefileGenerator::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> nmakeMakeOptions; + + // Since we have full control over the invocation of nmake, let us + // make it quiet. + nmakeMakeOptions.push_back(this->MakeSilentFlag); + nmakeMakeOptions.insert(nmakeMakeOptions.end(), makeOptions.begin(), + makeOptions.end()); + + this->cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( + makeCommand, makeProgram, projectName, projectDir, targetName, config, + fast, cmake::NO_BUILD_PARALLEL_LEVEL, verbose, nmakeMakeOptions); +} + +void cmGlobalNMakeMakefileGenerator::PrintBuildCommandAdvice(std::ostream& os, + int jobs) const +{ + if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) { + // nmake does not support parallel build level + // see https://msdn.microsoft.com/en-us/library/afyyse50.aspx + + /* clang-format off */ + os << + "Warning: NMake does not support parallel builds. " + "Ignoring parallel build command line option.\n"; + /* clang-format on */ + } + + this->cmGlobalUnixMakefileGenerator3::PrintBuildCommandAdvice( + os, cmake::NO_BUILD_PARALLEL_LEVEL); +} |