mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05:00
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.
This commit is contained in:
@@ -298,7 +298,16 @@ add_RunCMake_test(CompilerNotFound)
|
|||||||
if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
|
if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
|
||||||
list(APPEND CompilerTest_ARGS -DCMake_TEST_OBJC=1)
|
list(APPEND CompilerTest_ARGS -DCMake_TEST_OBJC=1)
|
||||||
endif()
|
endif()
|
||||||
|
if(CMAKE_Fortran_COMPILER)
|
||||||
|
list(APPEND CompilerTest_ARGS -DCMake_TEST_Fortran=1)
|
||||||
|
endif()
|
||||||
|
foreach(lang IN ITEMS CUDA HIP ISPC)
|
||||||
|
if(CMake_TEST_${lang})
|
||||||
|
list(APPEND CompilerTest_ARGS -DCMake_TEST_${lang}=1)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
add_RunCMake_test(CompilerTest)
|
add_RunCMake_test(CompilerTest)
|
||||||
|
set_property(TEST RunCMake.CompilerTest APPEND PROPERTY LABELS "CUDA" "HIP" "ISPC")
|
||||||
add_RunCMake_test(Configure -DMSVC_IDE=${MSVC_IDE})
|
add_RunCMake_test(Configure -DMSVC_IDE=${MSVC_IDE})
|
||||||
add_RunCMake_test(DisallowedCommands)
|
add_RunCMake_test(DisallowedCommands)
|
||||||
if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
|
if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- Check for working CUDA compiler: [^
|
||||||
|
]* - works
|
||||||
@@ -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)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- Check for working Fortran compiler: [^
|
||||||
|
]* - works
|
||||||
@@ -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)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- Check for working HIP compiler: [^
|
||||||
|
]* - works
|
||||||
@@ -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)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- The ISPC compiler identification is [^
|
||||||
|
]*
|
||||||
|
-- Configuring done
|
||||||
@@ -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)
|
||||||
@@ -3,6 +3,22 @@ include(RunCMake)
|
|||||||
run_cmake(C)
|
run_cmake(C)
|
||||||
run_cmake(CXX)
|
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)
|
if(CMake_TEST_OBJC)
|
||||||
run_cmake(OBJC)
|
run_cmake(OBJC)
|
||||||
run_cmake(OBJCXX)
|
run_cmake(OBJCXX)
|
||||||
|
|||||||
Reference in New Issue
Block a user