summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-24 16:17:07 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-01-24 16:23:04 (GMT)
commit9d0f61839bedfd3dae43e9fd24a8fe0f0649468e (patch)
treef7cb14566ac43fb6290a16becbda34a9cd1fa910 /Modules
parent4dbc9dfc7a1458878a26e1f0cec1a382e14bf48a (diff)
downloadCMake-9d0f61839bedfd3dae43e9fd24a8fe0f0649468e.zip
CMake-9d0f61839bedfd3dae43e9fd24a8fe0f0649468e.tar.gz
CMake-9d0f61839bedfd3dae43e9fd24a8fe0f0649468e.tar.bz2
CheckLanguage: Pass CMAKE_MAKE_PROGRAM to child process
Fixes: #20017
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 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