summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-03 19:08:54 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-19 14:20:11 (GMT)
commita19b811363422213fd0ac2d089f7585d9be73a42 (patch)
tree41b63178bb105326be6bca3425d8a642cb0c0289 /Modules
parent6b3cd64d42740618e0df6507194076185c1d91e2 (diff)
downloadCMake-a19b811363422213fd0ac2d089f7585d9be73a42.zip
CMake-a19b811363422213fd0ac2d089f7585d9be73a42.tar.gz
CMake-a19b811363422213fd0ac2d089f7585d9be73a42.tar.bz2
CheckLanguage: Pass generator instance into check
Otherwise we do not check for support for the language with the same generator instance as the caller.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckLanguage.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake
index 1ea91d2..70c14d7 100644
--- a/Modules/CheckLanguage.cmake
+++ b/Modules/CheckLanguage.cmake
@@ -43,11 +43,17 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
\"set(CMAKE_${lang}_COMPILER \\\"\${CMAKE_${lang}_COMPILER}\\\")\\n\"
)
")
+ if(CMAKE_GENERATOR_INSTANCE)
+ set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${CMAKE_GENERATOR_INSTANCE}")
+ else()
+ set(_D_CMAKE_GENERATOR_INSTANCE "")
+ endif()
execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang}
COMMAND ${CMAKE_COMMAND} . -G ${CMAKE_GENERATOR}
-A "${CMAKE_GENERATOR_PLATFORM}"
-T "${CMAKE_GENERATOR_TOOLSET}"
+ ${_D_CMAKE_GENERATOR_INSTANCE}
OUTPUT_VARIABLE output
ERROR_VARIABLE output
RESULT_VARIABLE result