[Cmake-commits] CMake branch, next, updated. v2.8.4-1167-gf52ca8c
Brad King
brad.king at kitware.com
Mon Mar 14 17:54:12 EDT 2011
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 f52ca8cb9cde2165be133920c06f4ee85452814c (commit)
via 339d5922d9baef98c3a19fd0712badeb3d9e2996 (commit)
from f3487ceddc2e009f28ad7e8a51a9e2f160250b4e (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=f52ca8cb9cde2165be133920c06f4ee85452814c
commit f52ca8cb9cde2165be133920c06f4ee85452814c
Merge: f3487ce 339d592
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 14 17:54:07 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 14 17:54:07 2011 -0400
Merge topic 'validate-custom-commands-issue-11963' into next
339d592 Validate custom command arguments (#11963)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=339d5922d9baef98c3a19fd0712badeb3d9e2996
commit 339d5922d9baef98c3a19fd0712badeb3d9e2996
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 14 17:47:31 2011 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Mar 14 17:49:30 2011 -0400
Validate custom command arguments (#11963)
Reject quoted commands immediately with an error message instead of
allowing a later assertion failure.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e14e44d..c36dd05 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -893,6 +893,20 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
return;
}
+ // Validate custom commands. TODO: More strict?
+ for(cmCustomCommandLines::const_iterator i=commandLines.begin();
+ i != commandLines.end(); ++i)
+ {
+ cmCustomCommandLine const& cl = *i;
+ if(!cl.empty() && !cl[0].empty() && cl[0][0] == '"')
+ {
+ cmOStringStream e;
+ e << "COMMAND may not contain literal quotes:\n " << cl[0] << "\n";
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return;
+ }
+ }
+
// Choose a source file on which to store the custom command.
cmSourceFile* file = 0;
if(main_dependency && main_dependency[0])
-----------------------------------------------------------------------
Summary of changes:
Source/cmMakefile.cxx | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list