diff options
author | Brad King <brad.king@kitware.com> | 2011-01-15 13:00:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-01-15 13:00:11 (GMT) |
commit | 9cefce09f63ebb19621e061a30fd5838ac834d0b (patch) | |
tree | 8c94793185cc7060fba4d2cb1d056266d8bd92cc /Source/cmSourceFile.cxx | |
parent | 28a0403c3491d4a96f5dc827e54442a1d0a0dea7 (diff) | |
download | CMake-9cefce09f63ebb19621e061a30fd5838ac834d0b.zip CMake-9cefce09f63ebb19621e061a30fd5838ac834d0b.tar.gz CMake-9cefce09f63ebb19621e061a30fd5838ac834d0b.tar.bz2 |
Report directory with missing source file (#11677)
Previously the error message for code like
add_executable(myexe does_not_exist/mysrc.c)
mentioned only that "mysrc.c" is not found. Report the directory too.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 26328cf..de7ff02 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -187,8 +187,13 @@ bool cmSourceFile::FindFullPath(std::string* error) } cmOStringStream e; - e << "Cannot find source file \"" << this->Location.GetName() << "\""; - e << ". Tried extensions"; + std::string missing = this->Location.GetDirectory(); + if(!missing.empty()) + { + missing += "/"; + } + missing += this->Location.GetName(); + e << "Cannot find source file:\n " << missing << "\nTried extensions"; for(std::vector<std::string>::const_iterator ext = srcExts.begin(); ext != srcExts.end(); ++ext) { |