diff options
author | Brad King <brad.king@kitware.com> | 2020-05-06 13:27:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-06 13:27:13 (GMT) |
commit | 1cadb625f26860030faaebaaf0bb897f439a3954 (patch) | |
tree | c6095da529b84eba228e9829f82a35022899590e /Tests/CMakeOnly | |
parent | 00065e2087ffd854a364507dcd84ef095aff1cc9 (diff) | |
parent | 5b304a75033905a33841a396773d356349930030 (diff) | |
download | CMake-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.txt | 18 |
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() |