summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-06 13:27:02 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-06 13:27:13 (GMT)
commit4ec59891ade803a3eaf27969e6594236e030c497 (patch)
tree6e0e9a915915b94cba0efed9ce3d5289ef7840f7 /Tests
parent2013c30c7bd5a2b625f9487019dfa69e6549461a (diff)
parent5b304a75033905a33841a396773d356349930030 (diff)
downloadCMake-4ec59891ade803a3eaf27969e6594236e030c497.zip
CMake-4ec59891ade803a3eaf27969e6594236e030c497.tar.gz
CMake-4ec59891ade803a3eaf27969e6594236e030c497.tar.bz2
Merge topic 'CheckLanguage-cuda-host' into release-3.17
5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !4711
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/CheckLanguage/CMakeLists.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt b/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
index 90aa921..1570c37 100644
--- a/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
@@ -18,16 +18,16 @@ if(APPLE)
list(APPEND LANGUAGES OBJC OBJCXX)
endif()
-foreach(lang ${LANGUAGES})
- check_language(${lang})
- if(NOT DEFINED CMAKE_${lang}_COMPILER)
- message(FATAL_ERROR "check_language(${lang}) did not set result")
+foreach(test_lang ${LANGUAGES})
+ check_language(${test_lang})
+ if(NOT DEFINED CMAKE_${test_lang}_COMPILER)
+ message(FATAL_ERROR "check_language(${test_lang}) did not set result")
endif()
- if(DEFINED expect_${lang})
- if(expect_${lang} AND NOT CMAKE_${lang}_COMPILER)
- message(FATAL_ERROR "check_language(${lang}) should not fail!")
- elseif(NOT expect_${lang} AND CMAKE_${lang}_COMPILER)
- message(FATAL_ERROR "check_language(${lang}) should not succeed!")
+ if(DEFINED expect_${test_lang})
+ if(expect_${test_lang} AND NOT CMAKE_${test_lang}_COMPILER)
+ message(FATAL_ERROR "check_language(${test_lang}) should not fail!")
+ elseif(NOT expect_${test_lang} AND CMAKE_${test_lang}_COMPILER)
+ message(FATAL_ERROR "check_language(${test_lang}) should not succeed!")
endif()
endif()
endforeach()