diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-08-22 09:30:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-08-22 10:06:58 (GMT) |
commit | 33055c405ed3b0e1df52c186f0d8a3e878aa88a8 (patch) | |
tree | 14f5a4fb37a84f5748584329e454502d524fe967 /Source/cmInstallExportGenerator.cxx | |
parent | 7324eb896eb7337aaec2baf44d11d419a9d87b30 (diff) | |
download | CMake-33055c405ed3b0e1df52c186f0d8a3e878aa88a8.zip CMake-33055c405ed3b0e1df52c186f0d8a3e878aa88a8.tar.gz CMake-33055c405ed3b0e1df52c186f0d8a3e878aa88a8.tar.bz2 |
Generate modern-style cmake code.
The commits 9db31162 (Remove CMake-language block-end command
arguments, 2012-08-13) and 77543bde (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.
Diffstat (limited to 'Source/cmInstallExportGenerator.cxx')
-rw-r--r-- | Source/cmInstallExportGenerator.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 3e9e6ac..1287ea6 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -183,11 +183,11 @@ cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os, { files.push_back(i->second); std::string config_test = this->CreateConfigTest(i->first.c_str()); - os << indent << "IF(" << config_test << ")\n"; + os << indent << "if(" << config_test << ")\n"; this->AddInstallRule(os, cmInstallType_FILES, files, false, this->FilePermissions.c_str(), 0, 0, 0, indent.Next()); - os << indent << "ENDIF(" << config_test << ")\n"; + os << indent << "endif()\n"; files.clear(); } } @@ -202,23 +202,23 @@ void cmInstallExportGenerator::GenerateScriptActions(std::ostream& os, installedDir += "/"; std::string installedFile = installedDir; installedFile += this->FileName; - os << indent << "IF(EXISTS \"" << installedFile << "\")\n"; + os << indent << "if(EXISTS \"" << installedFile << "\")\n"; Indent indentN = indent.Next(); Indent indentNN = indentN.Next(); Indent indentNNN = indentNN.Next(); - os << indentN << "FILE(DIFFERENT EXPORT_FILE_CHANGED FILES\n" + os << indentN << "file(DIFFERENT EXPORT_FILE_CHANGED FILES\n" << indentN << " \"" << installedFile << "\"\n" << indentN << " \"" << this->MainImportFile << "\")\n"; - os << indentN << "IF(EXPORT_FILE_CHANGED)\n"; - os << indentNN << "FILE(GLOB OLD_CONFIG_FILES \"" << installedDir + os << indentN << "if(EXPORT_FILE_CHANGED)\n"; + os << indentNN << "file(GLOB OLD_CONFIG_FILES \"" << installedDir << this->EFGen->GetConfigImportFileGlob() << "\")\n"; - os << indentNN << "IF(OLD_CONFIG_FILES)\n"; - os << indentNNN << "MESSAGE(STATUS \"Old export file \\\"" << installedFile + os << indentNN << "if(OLD_CONFIG_FILES)\n"; + os << indentNNN << "message(STATUS \"Old export file \\\"" << installedFile << "\\\" will be replaced. Removing files [${OLD_CONFIG_FILES}].\")\n"; - os << indentNNN << "FILE(REMOVE ${OLD_CONFIG_FILES})\n"; - os << indentNN << "ENDIF(OLD_CONFIG_FILES)\n"; - os << indentN << "ENDIF(EXPORT_FILE_CHANGED)\n"; - os << indent << "ENDIF()\n"; + os << indentNNN << "file(REMOVE ${OLD_CONFIG_FILES})\n"; + os << indentNN << "endif()\n"; + os << indentN << "endif()\n"; + os << indent << "endif()\n"; // Install the main export file. std::vector<std::string> files; |