This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 69b8d8e4f6f6c3ad1520050ecd6bf355c8e8d3da (commit)
via 8d9f39f4c324db01d5a60c5a783e1c44180c5c4c (commit)
from cbdc3e45f5ac59d2fbed3a0d56f16c59677c914d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69b8d8e4f6f6c3ad1520050ecd6bf355c8e8d3da
commit 69b8d8e4f6f6c3ad1520050ecd6bf355c8e8d3da
Merge: cbdc3e4 8d9f39f
Author: Stephen Kelly <[email protected]>
AuthorDate: Mon Apr 27 16:13:10 2015 -0400
Commit: CMake Topic Stage <[email protected]>
CommitDate: Mon Apr 27 16:13:10 2015 -0400
Merge topic 'include-early-optional-handling' into next
8d9f39f4 include: Ask for permission, rather than forgiveness.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d9f39f4c324db01d5a60c5a783e1c44180c5c4c
commit 8d9f39f4c324db01d5a60c5a783e1c44180c5c4c
Author: Stephen Kelly <[email protected]>
AuthorDate: Mon Apr 27 22:10:51 2015 +0200
Commit: Stephen Kelly <[email protected]>
CommitDate: Mon Apr 27 22:10:51 2015 +0200
include: Ask for permission, rather than forgiveness.
Check that a non-optional file exists before attempting to include
it. This makes more sense than relying on an error case deeper
within cmListFileCache.
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index 132b650..71dabaf 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -130,8 +130,20 @@ bool cmIncludeCommand
gg->GenerateImportFile(fname_abs);
}
+ std::string listFile =
+ cmSystemTools::CollapseFullPath(fname.c_str(),
+ this->Makefile->GetCurrentSourceDirectory());
+ if(optional && !cmSystemTools::FileExists(listFile.c_str()))
+ {
+ if (!resultVarName.empty())
+ {
+ this->Makefile->AddDefinition(resultVarName, "NOTFOUND");
+ }
+ return true;
+ }
+
bool readit =
- this->Makefile->ReadDependentFile(fname.c_str(), noPolicyScope);
+ this->Makefile->ReadDependentFile(listFile.c_str(), noPolicyScope);
// add the location of the included file if a result variable was given
if (!resultVarName.empty())
-----------------------------------------------------------------------
Summary of changes:
Source/cmIncludeCommand.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
_______________________________________________
Cmake-commits mailing list
[email protected]
http://public.kitware.com/mailman/listinfo/cmake-commits