summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpression.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-11-15 20:24:13 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-11-17 14:31:27 (GMT)
commit38cbf5e15ba4720f873d49f60898535e95123a7e (patch)
tree9453bb03ee4c82e5c73987ace9c353d8f71f4dd6 /Source/cmGeneratorExpression.cxx
parent37b5c78688aabbe179c7bf33409309d5b465a452 (diff)
downloadCMake-38cbf5e15ba4720f873d49f60898535e95123a7e.zip
CMake-38cbf5e15ba4720f873d49f60898535e95123a7e.tar.gz
CMake-38cbf5e15ba4720f873d49f60898535e95123a7e.tar.bz2
Genex: Add $<BUILD_LOCAL_INTERFACE:...> genex
Fixes: #23209
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 3efe574..b605350 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -227,8 +227,10 @@ static std::string stripExportInterface(
while (true) {
std::string::size_type bPos = input.find("$<BUILD_INTERFACE:", lastPos);
std::string::size_type iPos = input.find("$<INSTALL_INTERFACE:", lastPos);
+ std::string::size_type lPos =
+ input.find("$<BUILD_LOCAL_INTERFACE:", lastPos);
- pos = std::min({ bPos, iPos });
+ pos = std::min({ bPos, iPos, lPos });
if (pos == std::string::npos) {
break;
}
@@ -238,6 +240,7 @@ static std::string stripExportInterface(
{
BuildInterface,
InstallInterface,
+ BuildLocalInterface,
} foundGenex = FoundGenex::BuildInterface;
if (pos == bPos) {
foundGenex = FoundGenex::BuildInterface;
@@ -245,6 +248,9 @@ static std::string stripExportInterface(
} else if (pos == iPos) {
foundGenex = FoundGenex::InstallInterface;
pos += cmStrLen("$<INSTALL_INTERFACE:");
+ } else if (pos == lPos) {
+ foundGenex = FoundGenex::BuildLocalInterface;
+ pos += cmStrLen("$<BUILD_LOCAL_INTERFACE:");
} else {
assert(false && "Invalid position found");
}
@@ -287,6 +293,9 @@ static std::string stripExportInterface(
case FoundGenex::InstallInterface:
result = cmStrCat(result, "$<INSTALL_INTERFACE:", remaining);
break;
+ case FoundGenex::BuildLocalInterface:
+ result = cmStrCat(result, "$<BUILD_LOCAL_INTERFACE:", remaining);
+ break;
}
}
pos += traversed;