summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-13 19:56:06 (GMT)
committerBrad King <brad.king@kitware.com>2010-09-13 20:17:20 (GMT)
commita6b5ead62fb4e69c053d752570f4c8af24e41857 (patch)
tree293eb05765da0e3feaafe4611bb1741f9fb85fed /Source/cmSourceFile.cxx
parentf3bc219adbbf10f3a75af1ac1db1f47b90102e19 (diff)
downloadCMake-a6b5ead62fb4e69c053d752570f4c8af24e41857.zip
CMake-a6b5ead62fb4e69c053d752570f4c8af24e41857.tar.gz
CMake-a6b5ead62fb4e69c053d752570f4c8af24e41857.tar.bz2
Report missing source files with context of target
Previously we reported only the CMakeLists.txt file in the directory that adds the 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;
}