summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly
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)
commit1cadb625f26860030faaebaaf0bb897f439a3954 (patch)
treec6095da529b84eba228e9829f82a35022899590e /Tests/CMakeOnly
parent00065e2087ffd854a364507dcd84ef095aff1cc9 (diff)
parent5b304a75033905a33841a396773d356349930030 (diff)
downloadCMake-1cadb625f26860030faaebaaf0bb897f439a3954.zip
CMake-1cadb625f26860030faaebaaf0bb897f439a3954.tar.gz
CMake-1cadb625f26860030faaebaaf0bb897f439a3954.tar.bz2
Merge topic 'CheckLanguage-cuda-host'
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/CMakeOnly')
-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()