diff --git a/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt b/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt index bb4e7ae9bd..f285cfbfb6 100644 --- a/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt +++ b/Tests/CMakeOnly/CheckLanguage/CMakeLists.txt @@ -30,4 +30,7 @@ foreach(test_lang ${LANGUAGES}) message(FATAL_ERROR "check_language(${test_lang}) should not succeed!") endif() endif() + if(CMAKE_${test_lang}_COMPILER) + enable_language(${test_lang}) + endif() endforeach()