mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
cmExportInstallFileGenerator: fix error message construction
When multiple errors are generated, the string stream is not reset between cases. Avoid cascading error contents in future messages.
This commit is contained in:
@@ -439,11 +439,11 @@ bool cmExportInstallFileGenerator::CheckInterfaceDirs(
|
||||
if (cmHasPrefix(li, this->GetImportPrefixWithSlash())) {
|
||||
continue;
|
||||
}
|
||||
std::ostringstream e;
|
||||
if (genexPos != std::string::npos) {
|
||||
hadFatalError = true;
|
||||
}
|
||||
if (!cmSystemTools::FileIsFullPath(li)) {
|
||||
std::ostringstream e;
|
||||
/* clang-format off */
|
||||
e << "Target \"" << target->GetName() << "\" " << prop <<
|
||||
" property contains relative path:\n"
|
||||
@@ -465,6 +465,7 @@ bool cmExportInstallFileGenerator::CheckInterfaceDirs(
|
||||
}
|
||||
}
|
||||
if (inBinary) {
|
||||
std::ostringstream e;
|
||||
/* clang-format off */
|
||||
e << "Target \"" << target->GetName() << "\" " << prop <<
|
||||
" property contains path:\n"
|
||||
@@ -475,6 +476,7 @@ bool cmExportInstallFileGenerator::CheckInterfaceDirs(
|
||||
}
|
||||
if (!inSourceBuild) {
|
||||
if (inSource) {
|
||||
std::ostringstream e;
|
||||
e << "Target \"" << target->GetName() << "\" " << prop
|
||||
<< " property contains path:\n"
|
||||
" \""
|
||||
|
||||
Reference in New Issue
Block a user