summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-14 17:31:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-09-14 17:31:10 (GMT)
commit6580f5de996e99e090ccf9fefa5a2c5d14694478 (patch)
tree48ca163d80c1f13cf7b39b11a579e54afb375289 /Source/cmSourceFile.cxx
parentee66f2127167517bcaba326967bbbbcdffa97788 (diff)
parenta6b5ead62fb4e69c053d752570f4c8af24e41857 (diff)
downloadCMake-6580f5de996e99e090ccf9fefa5a2c5d14694478.zip
CMake-6580f5de996e99e090ccf9fefa5a2c5d14694478.tar.gz
CMake-6580f5de996e99e090ccf9fefa5a2c5d14694478.tar.bz2
Merge topic 'improve-missing-source-file-error'
a6b5ead Report missing source files with context of target
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index bc52d7f..b793cd5 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -101,11 +101,11 @@ cmSourceFileLocation const& cmSourceFile::GetLocation() const
}
//----------------------------------------------------------------------------
-std::string const& cmSourceFile::GetFullPath()
+std::string const& cmSourceFile::GetFullPath(std::string* error)
{
if(this->FullPath.empty())
{
- if(this->FindFullPath())
+ if(this->FindFullPath(error))
{
this->CheckExtension();
}
@@ -120,7 +120,7 @@ std::string const& cmSourceFile::GetFullPath() const
}
//----------------------------------------------------------------------------
-bool cmSourceFile::FindFullPath()
+bool cmSourceFile::FindFullPath(std::string* error)
{
// If thie method has already failed once do not try again.
if(this->FindFullPathFailed)
@@ -199,7 +199,14 @@ bool cmSourceFile::FindFullPath()
{
e << " ." << *ext;
}
- this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ if(error)
+ {
+ *error = e.str();
+ }
+ else
+ {
+ this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ }
this->FindFullPathFailed = true;
return false;
}