summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompilerTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-29 12:04:05 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-29 13:26:23 (GMT)
commit586c2ab4f1fd758956c6d4f149c6f5628de7ebeb (patch)
treed3873f36dee911b8fbbb94a07d25e3e80c1c18f1 /Tests/RunCMake/CompilerTest
parentcadcb6a5f0e1ebaefd74f8c52151e410c57cfa96 (diff)
downloadCMake-586c2ab4f1fd758956c6d4f149c6f5628de7ebeb.zip
CMake-586c2ab4f1fd758956c6d4f149c6f5628de7ebeb.tar.gz
CMake-586c2ab4f1fd758956c6d4f149c6f5628de7ebeb.tar.bz2
Tests: Test more CMakeTest*Compiler.cmake fallbacks
Extend the test added by commit f891a75d5c (Tests: Test CMakeTest*Compiler.cmake fallbacks, 2022-09-27) to cover more languages.
Diffstat (limited to 'Tests/RunCMake/CompilerTest')
-rw-r--r--Tests/RunCMake/CompilerTest/CUDA-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerTest/CUDA.cmake3
-rw-r--r--Tests/RunCMake/CompilerTest/Fortran-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerTest/Fortran.cmake3
-rw-r--r--Tests/RunCMake/CompilerTest/HIP-stdout.txt2
-rw-r--r--Tests/RunCMake/CompilerTest/HIP.cmake3
-rw-r--r--Tests/RunCMake/CompilerTest/ISPC-stdout.txt3
-rw-r--r--Tests/RunCMake/CompilerTest/ISPC.cmake3
-rw-r--r--Tests/RunCMake/CompilerTest/RunCMakeTest.cmake16
9 files changed, 37 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompilerTest/CUDA-stdout.txt b/Tests/RunCMake/CompilerTest/CUDA-stdout.txt
new file mode 100644
index 0000000..00d35df
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/CUDA-stdout.txt
@@ -0,0 +1,2 @@
+-- Check for working CUDA compiler: [^
+]* - works
diff --git a/Tests/RunCMake/CompilerTest/CUDA.cmake b/Tests/RunCMake/CompilerTest/CUDA.cmake
new file mode 100644
index 0000000..e8c19a0
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/CUDA.cmake
@@ -0,0 +1,3 @@
+# Pretend the ABI check failed in order to force the fall-back test to run.
+set(CMAKE_CUDA_ABI_COMPILED FALSE)
+enable_language(CUDA)
diff --git a/Tests/RunCMake/CompilerTest/Fortran-stdout.txt b/Tests/RunCMake/CompilerTest/Fortran-stdout.txt
new file mode 100644
index 0000000..d871fea
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/Fortran-stdout.txt
@@ -0,0 +1,2 @@
+-- Check for working Fortran compiler: [^
+]* - works
diff --git a/Tests/RunCMake/CompilerTest/Fortran.cmake b/Tests/RunCMake/CompilerTest/Fortran.cmake
new file mode 100644
index 0000000..8c83bd7
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/Fortran.cmake
@@ -0,0 +1,3 @@
+# Pretend the ABI check failed in order to force the fall-back test to run.
+set(CMAKE_Fortran_ABI_COMPILED FALSE)
+enable_language(Fortran)
diff --git a/Tests/RunCMake/CompilerTest/HIP-stdout.txt b/Tests/RunCMake/CompilerTest/HIP-stdout.txt
new file mode 100644
index 0000000..8b3baa7
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/HIP-stdout.txt
@@ -0,0 +1,2 @@
+-- Check for working HIP compiler: [^
+]* - works
diff --git a/Tests/RunCMake/CompilerTest/HIP.cmake b/Tests/RunCMake/CompilerTest/HIP.cmake
new file mode 100644
index 0000000..e56b77a
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/HIP.cmake
@@ -0,0 +1,3 @@
+# Pretend the ABI check failed in order to force the fall-back test to run.
+set(CMAKE_HIP_ABI_COMPILED FALSE)
+enable_language(HIP)
diff --git a/Tests/RunCMake/CompilerTest/ISPC-stdout.txt b/Tests/RunCMake/CompilerTest/ISPC-stdout.txt
new file mode 100644
index 0000000..7e45c91
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/ISPC-stdout.txt
@@ -0,0 +1,3 @@
+-- The ISPC compiler identification is [^
+]*
+-- Configuring done
diff --git a/Tests/RunCMake/CompilerTest/ISPC.cmake b/Tests/RunCMake/CompilerTest/ISPC.cmake
new file mode 100644
index 0000000..3ce7b28
--- /dev/null
+++ b/Tests/RunCMake/CompilerTest/ISPC.cmake
@@ -0,0 +1,3 @@
+# Pretend the ABI check failed in order to force the fall-back test to run.
+set(CMAKE_ISPC_ABI_COMPILED FALSE)
+enable_language(ISPC)
diff --git a/Tests/RunCMake/CompilerTest/RunCMakeTest.cmake b/Tests/RunCMake/CompilerTest/RunCMakeTest.cmake
index 995296a..2dd9c7f 100644
--- a/Tests/RunCMake/CompilerTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerTest/RunCMakeTest.cmake
@@ -3,6 +3,22 @@ include(RunCMake)
run_cmake(C)
run_cmake(CXX)
+if(CMake_TEST_CUDA)
+ run_cmake(CUDA)
+endif()
+
+if(CMake_TEST_Fortran)
+ run_cmake(Fortran)
+endif()
+
+if(CMake_TEST_HIP)
+ run_cmake(HIP)
+endif()
+
+if(CMake_TEST_ISPC)
+ run_cmake(ISPC)
+endif()
+
if(CMake_TEST_OBJC)
run_cmake(OBJC)
run_cmake(OBJCXX)