summaryrefslogtreecommitdiffstats
path: root/Modules/CheckLanguage.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-08 14:10:45 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-08 14:10:45 (GMT)
commit0f5e76df0cc97808f7dacdeb4376fe249af6c919 (patch)
tree1d08ab95b1e25038c5e29fe1d100195cf6d24cb4 /Modules/CheckLanguage.cmake
parent0a312e2271710554f8e73518dc4b28bd1d0d1d7a (diff)
downloadCMake-0f5e76df0cc97808f7dacdeb4376fe249af6c919.zip
CMake-0f5e76df0cc97808f7dacdeb4376fe249af6c919.tar.gz
CMake-0f5e76df0cc97808f7dacdeb4376fe249af6c919.tar.bz2
CheckLanguage: Pass generator platform and toolset into check
Otherwise we do not check for support for the language with the same generator settings as the caller.
Diffstat (limited to 'Modules/CheckLanguage.cmake')
-rw-r--r--Modules/CheckLanguage.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake
index 6b4a9e4..1ea91d2 100644
--- a/Modules/CheckLanguage.cmake
+++ b/Modules/CheckLanguage.cmake
@@ -46,6 +46,8 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
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}"
OUTPUT_VARIABLE output
ERROR_VARIABLE output
RESULT_VARIABLE result