summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-31 16:43:48 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-31 16:43:48 (GMT)
commitb641a80d55ccde59d8e5c25c63b44df5ee0d999c (patch)
tree58fc0f683367ac491fe148199c31225e247c1a9c /Tests/RunCMake/CMakeLists.txt
parent46c1693602fa7ae8d1cd332228dad10ea98a6877 (diff)
downloadCMake-b641a80d55ccde59d8e5c25c63b44df5ee0d999c.zip
CMake-b641a80d55ccde59d8e5c25c63b44df5ee0d999c.tar.gz
CMake-b641a80d55ccde59d8e5c25c63b44df5ee0d999c.tar.bz2
Tests: Factor out a CMake_TEST_OBJC variable for OBJC/OBJCXX test conditions
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 280a21a..88dbe25 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -299,8 +299,8 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(CompilerChange)
endif()
add_RunCMake_test(CompilerNotFound)
-if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
- list(APPEND CompilerTest_ARGS -DCMake_TEST_OBJC=1)
+if(DEFINED CMake_TEST_OBJC)
+ list(APPEND CompilerTest_ARGS -DCMake_TEST_OBJC=${CMake_TEST_OBJC})
endif()
if(CMAKE_Fortran_COMPILER)
list(APPEND CompilerTest_ARGS -DCMake_TEST_Fortran=1)
@@ -897,13 +897,13 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
if(DEFINED CMake_TEST_ISPC)
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_ISPC=${CMake_TEST_ISPC})
endif()
+ if(DEFINED CMake_TEST_OBJC)
+ list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=${CMake_TEST_OBJC})
+ list(APPEND LinkerLauncher_ARGS -DCMake_TEST_OBJC=${CMake_TEST_OBJC})
+ endif()
if(CMAKE_Fortran_COMPILER)
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_Fortran=1)
endif()
- if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
- list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=1)
- list(APPEND LinkerLauncher_ARGS -DCMake_TEST_OBJC=1)
- endif()
add_RunCMake_test(CompilerLauncher)
set_property(TEST RunCMake.CompilerLauncher APPEND
PROPERTY LABELS "CUDA;HIP;ISPC")