summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_package/FindRegistryView.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/find_package/FindRegistryView.cmake')
-rw-r--r--Tests/RunCMake/find_package/FindRegistryView.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/FindRegistryView.cmake b/Tests/RunCMake/find_package/FindRegistryView.cmake
new file mode 100644
index 0000000..e4080a6
--- /dev/null
+++ b/Tests/RunCMake/find_package/FindRegistryView.cmake
@@ -0,0 +1,11 @@
+
+if (EXPECTED_REGISTRY_VIEW STREQUAL "UNDEFINED")
+ if (DEFINED ${CMAKE_FIND_PACKAGE_NAME}_FIND_REGISTRY_VIEW)
+ message(SEND_ERROR "${CMAKE_FIND_PACKAGE_NAME}_FIND_REGISTRY_VIEW: unexpectedly defined as '${${CMAKE_FIND_PACKAGE_NAME}_FIND_REGISTRY_VIEW}' instead of '${EXPECTED_REGISTRY_VIEW}'")
+ endif()
+ return()
+endif()
+
+if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_REGISTRY_VIEW STREQUAL EXPECTED_REGISTRY_VIEW)
+ message(SEND_ERROR "${CMAKE_FIND_PACKAGE_NAME}_FIND_REGISTRY_VIEW: '${${CMAKE_FIND_PACKAGE_NAME}_FIND_REGISTRY_VIEW}' instead of '${EXPECTED_REGISTRY_VIEW}'")
+endif()