summaryrefslogtreecommitdiff
path: root/Source/cmOrderDirectories.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-07-29 14:01:04 -0400
committerBrad King <brad.king@kitware.com>2008-07-29 14:01:04 -0400
commit01d143c77b7d50424950e59ef2912de31f836de5 (patch)
treea0dc27fde8d2c4d091222fab4b26e3933812151a /Source/cmOrderDirectories.cxx
parent478fbdfc238dade9d10bb7cc199de0108c900a39 (diff)
downloadcmake-01d143c77b7d50424950e59ef2912de31f836de5.tar.gz
ENH: Provide context in path ordering warnings
Diffstat (limited to 'Source/cmOrderDirectories.cxx')
-rw-r--r--Source/cmOrderDirectories.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 877b26a5ba..c618a57a2f 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -18,6 +18,7 @@
#include "cmGlobalGenerator.h"
#include "cmSystemTools.h"
+#include "cmake.h"
#include <assert.h>
@@ -239,11 +240,11 @@ bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir)
//----------------------------------------------------------------------------
cmOrderDirectories::cmOrderDirectories(cmGlobalGenerator* gg,
- const char* name,
+ cmTarget* target,
const char* purpose)
{
this->GlobalGenerator = gg;
- this->Name = name;
+ this->Target = target;
this->Purpose = purpose;
this->Computed = false;
}
@@ -510,22 +511,24 @@ void cmOrderDirectories::DiagnoseCycle()
// Construct the message.
cmOStringStream e;
- e << "WARNING: Cannot generate a safe " << this->Purpose
- << " for target " << this->Name
+ e << "Cannot generate a safe " << this->Purpose
+ << " for target " << this->Target->GetName()
<< " because there is a cycle in the constraint graph:\n";
// Display the conflict graph.
for(unsigned int i=0; i < this->ConflictGraph.size(); ++i)
{
ConflictList const& clist = this->ConflictGraph[i];
- e << "dir " << i << " is [" << this->OriginalDirectories[i] << "]\n";
+ e << " dir " << i << " is [" << this->OriginalDirectories[i] << "]\n";
for(ConflictList::const_iterator j = clist.begin();
j != clist.end(); ++j)
{
- e << " dir " << j->first << " must precede it due to ";
+ e << " dir " << j->first << " must precede it due to ";
this->ConstraintEntries[j->second]->Report(e);
e << "\n";
}
}
- cmSystemTools::Message(e.str().c_str());
+ e << "Some of these libraries may not be found correctly.";
+ this->GlobalGenerator->GetCMakeInstance()
+ ->IssueMessage(cmake::WARNING, e.str(), this->Target->GetBacktrace());
}