summaryrefslogtreecommitdiffstats
path: root/Source/cmExportInstallFileGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-11-01 20:50:42 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-11-01 21:29:37 (GMT)
commit2ec1156b80485fedba5b6d9b0802c21e1cbc2d8f (patch)
treef4cd9035b6f4bf3cbbd169718711a2604eed5969 /Source/cmExportInstallFileGenerator.cxx
parent6660926f22b940759954e74e2b4c0c3dd0ff1991 (diff)
downloadCMake-2ec1156b80485fedba5b6d9b0802c21e1cbc2d8f.zip
CMake-2ec1156b80485fedba5b6d9b0802c21e1cbc2d8f.tar.gz
CMake-2ec1156b80485fedba5b6d9b0802c21e1cbc2d8f.tar.bz2
Refactor: Generalize cmExportInstallFileGenerator::ReplaceInstallPrefix()
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r--Source/cmExportInstallFileGenerator.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 6d29c99..090e30f 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -258,15 +258,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os)
void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input)
{
- std::string::size_type pos = 0;
- std::string::size_type lastPos = pos;
-
- while ((pos = input.find("$<INSTALL_PREFIX>", lastPos)) !=
- std::string::npos) {
- std::string::size_type endPos = pos + sizeof("$<INSTALL_PREFIX>") - 1;
- input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}");
- lastPos = endPos;
- }
+ cmGeneratorExpression::ReplaceInstallPrefix(input, "${_IMPORT_PREFIX}");
}
bool cmExportInstallFileGenerator::GenerateImportFileConfig(