summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly/CheckLanguageHIPPlatform2/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeOnly/CheckLanguageHIPPlatform2/CMakeLists.txt')
-rw-r--r--Tests/CMakeOnly/CheckLanguageHIPPlatform2/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/CheckLanguageHIPPlatform2/CMakeLists.txt b/Tests/CMakeOnly/CheckLanguageHIPPlatform2/CMakeLists.txt
new file mode 100644
index 0000000..f251c49
--- /dev/null
+++ b/Tests/CMakeOnly/CheckLanguageHIPPlatform2/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required (VERSION 3.28)
+project(CheckLanguageHIPPlatform2 NONE)
+include(CheckLanguage)
+
+set(CMAKE_HIP_PLATFORM "not-a-hip-platform" CACHE STRING "")
+check_language(HIP)
+
+if(NOT DEFINED CMAKE_HIP_COMPILER)
+ message(FATAL_ERROR "check_language did not set result")
+endif()
+
+if (CMAKE_HIP_COMPILER)
+ message(FATAL_ERROR "check_language should have failed")
+endif()