summaryrefslogtreecommitdiffstats
path: root/Modules/CheckLanguage.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-24 12:22:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-24 12:22:25 (GMT)
commit11dcf81c44148295fd04b98fd808224ff7b44ed7 (patch)
tree750b70dfb215862678a9f5733a78b5ef0320161a /Modules/CheckLanguage.cmake
parent48c713d32445620c81f20f6039490823827e9176 (diff)
parent9ffb35386fb923a5959eec482bfa131aa3feaa18 (diff)
downloadCMake-11dcf81c44148295fd04b98fd808224ff7b44ed7.zip
CMake-11dcf81c44148295fd04b98fd808224ff7b44ed7.tar.gz
CMake-11dcf81c44148295fd04b98fd808224ff7b44ed7.tar.bz2
Merge topic 'generator-instance'
9ffb3538 VS: Select and save a VS 2017 instance persistently 17edfa41 cmVSSetupHelper: Add option to specify an instance a19b8113 CheckLanguage: Pass generator instance into check 6b3cd64d ExternalProject: Propagate the generator instance 314613d1 Add infrastructure for generators to select a build tool instance Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1394
Diffstat (limited to 'Modules/CheckLanguage.cmake')
-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