[Cmake-commits] CMake branch, next, updated. v2.8.7-2175-g35e2dbd
Rolf Eike Beer
eike at sf-mail.de
Fri Jan 20 13:33:39 EST 2012
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 35e2dbd8a62f825e84e944523bfa527be0780e7a (commit)
via faf92b6872b8b097fee1c75cc9544b73a4c2e899 (commit)
from af59a3be118a01c42a6cd8e4ec3aa99b8c862ec6 (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=35e2dbd8a62f825e84e944523bfa527be0780e7a
commit 35e2dbd8a62f825e84e944523bfa527be0780e7a
Merge: af59a3b faf92b6
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 20 13:33:35 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 20 13:33:35 2012 -0500
Merge topic 'uninitialized-var-in-if' into next
faf92b6 fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=faf92b6872b8b097fee1c75cc9544b73a4c2e899
commit faf92b6872b8b097fee1c75cc9544b73a4c2e899
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jan 20 18:27:26 2012 +0100
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Jan 20 19:32:00 2012 +0100
fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
Also adds test to verify this.
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 22ba28f..4eed477 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -910,6 +910,7 @@ bool cmIfCommand::IsTrue(const std::vector<std::string> &args,
if (newArgs.size() != 1)
{
errorString = "Unknown arguments specified";
+ status = cmake::FATAL_ERROR;
return false;
}
diff --git a/Tests/CMakeTests/If-Invalid-Argument.cmake b/Tests/CMakeTests/If-Invalid-Argument.cmake
new file mode 100644
index 0000000..b4fb97f
--- /dev/null
+++ b/Tests/CMakeTests/If-Invalid-Argument.cmake
@@ -0,0 +1,2 @@
+if (NOT foo bar STREQUAL "foo bar")
+endif()
diff --git a/Tests/CMakeTests/IfTest.cmake.in b/Tests/CMakeTests/IfTest.cmake.in
index e5211b4..43a15d4 100644
--- a/Tests/CMakeTests/IfTest.cmake.in
+++ b/Tests/CMakeTests/IfTest.cmake.in
@@ -156,3 +156,11 @@ foreach(_bad 2x -2x)
endforeach()
test_vars("")
+
+set(Invalid-Argument-RESULT 1)
+set(Invalid-Argument-STDERR ".*CMake Error at @CMAKE_CURRENT_SOURCE_DIR@/If-Invalid-Argument.cmake:1 \\(if\\):.*Unknown arguments specified.*")
+
+include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
+check_cmake_test(If
+ Invalid-Argument
+)
-----------------------------------------------------------------------
Summary of changes:
Source/cmIfCommand.cxx | 1 +
Tests/CMakeTests/If-Invalid-Argument.cmake | 2 ++
Tests/CMakeTests/IfTest.cmake.in | 8 ++++++++
3 files changed, 11 insertions(+), 0 deletions(-)
create mode 100644 Tests/CMakeTests/If-Invalid-Argument.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list