summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-01-25 16:17:46 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-01-25 16:17:46 (GMT)
commit30620e74770e52ff4b2b03850d3ed3f0e21921a3 (patch)
tree70e3a7c13d2d7f3c816c4be2eeb12fff8801d220 /Tests
parentf47fea95d7e07cfa634210337036a03dae3539c9 (diff)
parent54fd9e38bb912b94cf32fecac5028d462f4e659f (diff)
downloadCMake-30620e74770e52ff4b2b03850d3ed3f0e21921a3.zip
CMake-30620e74770e52ff4b2b03850d3ed3f0e21921a3.tar.gz
CMake-30620e74770e52ff4b2b03850d3ed3f0e21921a3.tar.bz2
Merge topic 'uninitialized-var-in-if'
54fd9e3 fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeTests/If-Invalid-Argument.cmake2
-rw-r--r--Tests/CMakeTests/IfTest.cmake.in8
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
+)