summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake')
-rw-r--r--Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 55c37c2..1b4532d 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -25,10 +25,12 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
IF (${_lang} STREQUAL "c++")
SET(_compilerExecutable "${CMAKE_CXX_COMPILER}")
+ SET(_arg1 "${CMAKE_CXX_COMPILER_ARG1}")
ELSE ()
SET(_compilerExecutable "${CMAKE_C_COMPILER}")
+ SET(_arg1 "${CMAKE_C_COMPILER_ARG1}")
ENDIF ()
- EXECUTE_PROCESS(COMMAND ${_compilerExecutable} -v -E -x ${_lang} -dD dummy
+ EXECUTE_PROCESS(COMMAND ${_compilerExecutable} ${_arg1} -v -E -x ${_lang} -dD dummy
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
ERROR_VARIABLE _gccOutput
OUTPUT_VARIABLE _gccStdout )