diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-20 17:27:26 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-22 11:15:57 (GMT) |
commit | 54fd9e38bb912b94cf32fecac5028d462f4e659f (patch) | |
tree | 6dfc3a6eb72fa004a674e3acb07de78dd621ed49 /Tests | |
parent | b8ff1c1e72899e7381d93e44b00824faf73d94ab (diff) | |
download | CMake-54fd9e38bb912b94cf32fecac5028d462f4e659f.zip CMake-54fd9e38bb912b94cf32fecac5028d462f4e659f.tar.gz CMake-54fd9e38bb912b94cf32fecac5028d462f4e659f.tar.bz2 |
fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
Also adds test to verify this.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeTests/If-Invalid-Argument.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/IfTest.cmake.in | 8 |
2 files changed, 10 insertions, 0 deletions
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 +) |