CodeLite generator: simplify code a bit
This commit is contained in:
parent
8472ef243f
commit
c8e565a06e
|
@ -443,25 +443,21 @@ cmExtraCodeLiteGenerator::GetConfigurationName(const cmMakefile* mf) const
|
|||
std::string
|
||||
cmExtraCodeLiteGenerator::GetBuildCommand(const cmMakefile* mf) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
std::string generator = mf->GetSafeDefinition("CMAKE_GENERATOR");
|
||||
std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||
std::string buildCommand = make; // Default
|
||||
if ( generator == "NMake Makefiles" )
|
||||
if ( generator == "NMake Makefiles" ||
|
||||
generator == "Ninja" )
|
||||
{
|
||||
buildCommand = make;
|
||||
}
|
||||
else if ( generator == "MinGW Makefiles" ||
|
||||
generator == "Unix Makefiles" )
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << make << " -j " << this->CpuCount;
|
||||
buildCommand = ss.str();
|
||||
}
|
||||
else if ( generator == "Ninja" )
|
||||
{
|
||||
ss << make;
|
||||
buildCommand = ss.str();
|
||||
}
|
||||
return buildCommand;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue