Browse Source

Specify the target whose includes are being listed.

Stephen Kelly 13 years ago
parent
commit
aa6674831c

+ 2 - 2
Source/cmTarget.cxx

@@ -2785,8 +2785,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;

+ 4 - 4
Tests/RunCMake/include_directories/DebugIncludes-stderr.txt

@@ -1,5 +1,5 @@
 CMake Warning at DebugIncludes.cmake:8 \(include_directories\):
-  Used includes:
+  Used includes for target lll:
 
    \* .*/Tests/RunCMake/include_directories/one
    \* .*/Tests/RunCMake/include_directories/two
@@ -8,7 +8,7 @@ Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
 +
 CMake Warning at DebugIncludes.cmake:13 \(set_property\):
-  Used includes:
+  Used includes for target lll:
 
    \* .*/Tests/RunCMake/include_directories/three
 
@@ -16,7 +16,7 @@ Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
 +
 CMake Warning at DebugIncludes.cmake:18 \(include_directories\):
-  Used includes:
+  Used includes for target lll:
 
    \* .*/Tests/RunCMake/include_directories/four
 
@@ -24,7 +24,7 @@ Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
 +
 CMake Warning at DebugIncludes.cmake:25 \(set_property\):
-  Used includes:
+  Used includes for target lll:
 
    \* .*/Tests/RunCMake/include_directories/five
    \* .*/Tests/RunCMake/include_directories/six