mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 09:59:20 -05:00
Generate modern-style cmake code.
The commits9db31162(Remove CMake-language block-end command arguments, 2012-08-13) and77543bde(Convert CMake-language commands to lower case, 2012-08-13) changed most cmake code to use lowercase commands and no parameters in termination commands. However, those changes excluded cmake code generated in c++ by cmake. Make a similar style change to code generated by cmake.
This commit is contained in:
@@ -185,9 +185,9 @@ void cmScriptGenerator::GenerateScriptActionsOnce(std::ostream& os,
|
||||
{
|
||||
// Generate a per-configuration block.
|
||||
std::string config_test = this->CreateConfigTest(this->Configurations);
|
||||
os << indent << "IF(" << config_test << ")\n";
|
||||
os << indent << "if(" << config_test << ")\n";
|
||||
this->GenerateScriptActions(os, indent.Next());
|
||||
os << indent << "ENDIF(" << config_test << ")\n";
|
||||
os << indent << "endif(" << config_test << ")\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ void cmScriptGenerator::GenerateScriptActionsPerConfig(std::ostream& os,
|
||||
{
|
||||
// Generate a per-configuration block.
|
||||
std::string config_test = this->CreateConfigTest(config);
|
||||
os << indent << (first? "IF(" : "ELSEIF(") << config_test << ")\n";
|
||||
os << indent << (first? "if(" : "elseif(") << config_test << ")\n";
|
||||
this->GenerateScriptForConfig(os, config, indent.Next());
|
||||
first = false;
|
||||
}
|
||||
@@ -228,10 +228,10 @@ void cmScriptGenerator::GenerateScriptActionsPerConfig(std::ostream& os,
|
||||
{
|
||||
if(this->NeedsScriptNoConfig())
|
||||
{
|
||||
os << indent << "ELSE()\n";
|
||||
os << indent << "else()\n";
|
||||
this->GenerateScriptNoConfig(os, indent.Next());
|
||||
}
|
||||
os << indent << "ENDIF()\n";
|
||||
os << indent << "endif()\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user