summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-14 12:22:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-07-14 12:22:27 (GMT)
commit652b2956c85987300fe0092ecf476fe305e2aecd (patch)
tree0f285cca0ff1e88768065bc197b2955d269c3806 /Tests
parent52db8d55e8418ba29df8cf108c789fa909a4398e (diff)
parentfda50a08437d99aba753bc84d26ba535e06e7b06 (diff)
downloadCMake-652b2956c85987300fe0092ecf476fe305e2aecd.zip
CMake-652b2956c85987300fe0092ecf476fe305e2aecd.tar.gz
CMake-652b2956c85987300fe0092ecf476fe305e2aecd.tar.bz2
Merge topic 'CMakePushCheckState-fix-RESET'
fda50a08 CMakePushCheckState: Fix cmake_push_check_state RESET argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1040
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeTests/PushCheckStateTest.cmake.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/CMakeTests/PushCheckStateTest.cmake.in b/Tests/CMakeTests/PushCheckStateTest.cmake.in
index b4c48f4..cbd879d 100644
--- a/Tests/CMakeTests/PushCheckStateTest.cmake.in
+++ b/Tests/CMakeTests/PushCheckStateTest.cmake.in
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.8)
include(CMakePushCheckState)
set(CMAKE_EXTRA_INCLUDE_FILES file1)
@@ -26,6 +27,27 @@ set(CMAKE_REQUIRED_LIBRARIES lib3)
set(CMAKE_REQUIRED_FLAGS flag3)
set(CMAKE_REQUIRED_QUIET 3)
+cmake_push_check_state(RESET)
+
+foreach(pair IN ITEMS
+ EXTRA_INCLUDE_FILES|
+ REQUIRED_INCLUDES|
+ REQUIRED_DEFINITIONS|
+ REQUIRED_LIBRARIES|
+ REQUIRED_FLAGS|
+ REQUIRED_QUIET|
+ )
+ string(REPLACE "|" ";" pair "${pair}")
+ list(GET pair 0 var)
+ list(GET pair 1 expected)
+ if (NOT "${CMAKE_${var}}" STREQUAL "${expected}")
+ set(fatal TRUE)
+ message("ERROR: CMAKE_${var} is \"${CMAKE_${var}}\" (expected \"${expected}\")" )
+ endif()
+endforeach()
+
+cmake_pop_check_state()
+
cmake_pop_check_state()
foreach(pair IN ITEMS