summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 25660dc..2b912f3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -152,6 +152,7 @@ cmTarget::cmTarget()
this->IsApple = false;
this->IsImportedTarget = false;
this->BuildInterfaceIncludesAppended = false;
+ this->DebugIncludesDone = false;
}
//----------------------------------------------------------------------------
@@ -2750,11 +2751,17 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
cmSystemTools::ExpandListArgument(debugProp, debugProperties);
}
- bool debugIncludes = std::find(debugProperties.begin(),
+ bool debugIncludes = !this->DebugIncludesDone
+ && std::find(debugProperties.begin(),
debugProperties.end(),
"INCLUDE_DIRECTORIES")
!= debugProperties.end();
+ if (this->Makefile->IsGeneratingBuildSystem())
+ {
+ this->DebugIncludesDone = true;
+ }
+
for (std::vector<cmTargetInternals::IncludeDirectoriesEntry*>::const_iterator
it = this->Internal->IncludeDirectoriesEntries.begin(),
end = this->Internal->IncludeDirectoriesEntries.end();
@@ -2789,8 +2796,8 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
if (!usedIncludes.empty())
{
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG,
- "Used includes:\n" + usedIncludes,
- (*it)->ge->GetBacktrace());
+ "Used includes for target " + this->Name + ":\n"
+ + usedIncludes, (*it)->ge->GetBacktrace());
}
}
return includes;