From 0239b586bdca2173f8b7309bce7771f59ac99568 Mon Sep 17 00:00:00 2001 From: Adam Oleksy Date: Wed, 5 Sep 2018 14:55:08 +0200 Subject: Extra Generator: Fix handling of CMAKE__COMPILER_ARG1 The "arg1" value is a command-line string so we must parse it to get separate arguments for `execute_process`. --- Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake index 55e0373..11f4a29 100644 --- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake +++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake @@ -27,6 +27,7 @@ macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines set(_compilerExecutable "${CMAKE_C_COMPILER}") set(_arg1 "${CMAKE_C_COMPILER_ARG1}") endif () + separate_arguments(_arg1 NATIVE_COMMAND "${_arg1}") execute_process(COMMAND ${_compilerExecutable} ${_arg1} ${_stdver} ${_stdlib} -v -E -x ${_lang} -dD dummy WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles ERROR_VARIABLE _gccOutput -- cgit v0.12