summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-04-29 18:17:28 (GMT)
committerBrad King <brad.king@kitware.com>2008-04-29 18:17:28 (GMT)
commitfb8c255c2de917949227e7be02a2d5cad3ddce29 (patch)
tree5677bd2cd68778c2085e24176e27ef5d7fff57ff /Source/cmMakefile.cxx
parent2421c11a98e132a8972b2269a97b73921c74d194 (diff)
downloadCMake-fb8c255c2de917949227e7be02a2d5cad3ddce29.zip
CMake-fb8c255c2de917949227e7be02a2d5cad3ddce29.tar.gz
CMake-fb8c255c2de917949227e7be02a2d5cad3ddce29.tar.bz2
ENH: In cmMakefile::IssueMessage report the directory-level context even if no list file is currently being processed.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 135dc28..3a208c3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -299,12 +299,21 @@ void cmMakefile::IssueMessage(cmake::MessageType t,
}
this->GetBacktrace(backtrace);
}
- else if(!this->ListFileStack.empty())
+ else
{
- // We are processing the project but are not currently executing a
- // command. Add whatever context information we have.
cmListFileContext lfc;
- lfc.FilePath = this->ListFileStack.back();
+ if(this->ListFileStack.empty())
+ {
+ // We are not processing the project. Add the directory-level context.
+ lfc.FilePath = this->GetCurrentDirectory();
+ lfc.FilePath += "/CMakeLists.txt";
+ }
+ else
+ {
+ // We are processing the project but are not currently executing a
+ // command. Add whatever context information we have.
+ lfc.FilePath = this->ListFileStack.back();
+ }
lfc.Line = 0;
if(!this->GetCMakeInstance()->GetIsInTryCompile())
{