summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeOnly/CheckLanguage/CMakeLists.txt')
-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()