summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-04 13:23:13 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-04 13:53:22 (GMT)
commit3ded5b6da8cb10d855e36d4ea534222ba870d165 (patch)
tree8042a90421eb5eb00d6dfd11755862ac1a67dec8 /Source/cmExportFileGenerator.cxx
parent65020633e62eaf0d86f85bcf1240caacd2095de9 (diff)
downloadCMake-3ded5b6da8cb10d855e36d4ea534222ba870d165.zip
CMake-3ded5b6da8cb10d855e36d4ea534222ba870d165.tar.gz
CMake-3ded5b6da8cb10d855e36d4ea534222ba870d165.tar.bz2
install,export: Fix export of a genex following $<INSTALL_PREFIX>
The relative path check added by commit 5838aba1aa (Export: Report error on relative include with genex., 2013-11-26, v3.0.0-rc1~285^2) was added one condition too early. If the value starts in `${_IMPORT_PREFIX}` (which comes from `$<INSTALL_PREFIX>`) then it is an absolute path. Fixes: #19791
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index b968537..3d7eccc 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -216,6 +216,9 @@ static bool checkInterfaceDirs(const std::string& prepro,
if (genexPos == 0) {
continue;
}
+ if (cmHasLiteralPrefix(li, "${_IMPORT_PREFIX}")) {
+ continue;
+ }
MessageType messageType = MessageType::FATAL_ERROR;
std::ostringstream e;
if (genexPos != std::string::npos) {
@@ -237,9 +240,6 @@ static bool checkInterfaceDirs(const std::string& prepro,
hadFatalError = true;
}
}
- if (cmHasLiteralPrefix(li, "${_IMPORT_PREFIX}")) {
- continue;
- }
if (!cmSystemTools::FileIsFullPath(li)) {
/* clang-format off */
e << "Target \"" << target->GetName() << "\" " << prop <<