summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-27 14:35:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-27 14:35:14 (GMT)
commitfd6c1d99e3f678044c3cd1b5a6da808ecce825c2 (patch)
tree1c7d4ec50ac8578e950c518ce5693d481ba371a2
parent6f7f293562b1dd2ad7de39ffec9a50f518f72341 (diff)
parent9d0f61839bedfd3dae43e9fd24a8fe0f0649468e (diff)
downloadCMake-fd6c1d99e3f678044c3cd1b5a6da808ecce825c2.zip
CMake-fd6c1d99e3f678044c3cd1b5a6da808ecce825c2.tar.gz
CMake-fd6c1d99e3f678044c3cd1b5a6da808ecce825c2.tar.bz2
Merge topic 'check-language-make-program'
9d0f61839b CheckLanguage: Pass CMAKE_MAKE_PROGRAM to child process Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4272
-rw-r--r--Modules/CheckLanguage.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake
index a337926..997cc8d 100644
--- a/Modules/CheckLanguage.cmake
+++ b/Modules/CheckLanguage.cmake
@@ -63,12 +63,18 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
else()
set(_D_CMAKE_GENERATOR_INSTANCE "")
endif()
+ if(CMAKE_GENERATOR MATCHES "^(Xcode$|Green Hills MULTI$|Visual Studio)")
+ set(_D_CMAKE_MAKE_PROGRAM "")
+ else()
+ set(_D_CMAKE_MAKE_PROGRAM "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}")
+ 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}
+ ${_D_CMAKE_MAKE_PROGRAM}
OUTPUT_VARIABLE output
ERROR_VARIABLE output
RESULT_VARIABLE result