[Cmake-commits] CMake branch, next, updated. v2.8.7-2184-gdb18163

Rolf Eike Beer eike at sf-mail.de
Sun Jan 22 06:16:24 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  db18163a1dc6151d74027f3be3b12dd58971a40b (commit)
       via  54fd9e38bb912b94cf32fecac5028d462f4e659f (commit)
      from  2bcb720d9825e5f7f2ff51f3751cabf68f251172 (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=db18163a1dc6151d74027f3be3b12dd58971a40b
commit db18163a1dc6151d74027f3be3b12dd58971a40b
Merge: 2bcb720 54fd9e3
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sun Jan 22 06:16:21 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 22 06:16:21 2012 -0500

    Merge topic 'uninitialized-var-in-if' into next
    
    54fd9e3 fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54fd9e38bb912b94cf32fecac5028d462f4e659f
commit 54fd9e38bb912b94cf32fecac5028d462f4e659f
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: Sun Jan 22 12:15:57 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..639e226 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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list