diff options
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 6e7ef4e..e997158 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -734,6 +734,22 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( lastPos = nameStartPos + libName.size() + 1; } + while (errorString.empty() && + (pos = input.find("$<COMPILE_ONLY:", lastPos)) != std::string::npos) { + std::string::size_type nameStartPos = pos + cmStrLen("$<COMPILE_ONLY:"); + std::string::size_type endPos = input.find('>', nameStartPos); + if (endPos == std::string::npos) { + errorString = "$<COMPILE_ONLY:...> expression incomplete"; + break; + } + std::string libName = input.substr(nameStartPos, endPos - nameStartPos); + if (cmGeneratorExpression::IsValidTargetName(libName) && + this->AddTargetNamespace(libName, target, lg)) { + input.replace(nameStartPos, endPos - nameStartPos, libName); + } + lastPos = nameStartPos + libName.size() + 1; + } + this->ReplaceInstallPrefix(input); if (!errorString.empty()) { |