--- a/scripts/cmake/genout.cmake.in +++ b/scripts/cmake/genout.cmake.in @@ -18,6 +18,7 @@ set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@") set(AWK "@AWK@") set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") +set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@) set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@") set(PNG_PREFIX "@PNG_PREFIX@") @@ -62,7 +63,7 @@ if(INPUTEXT STREQUAL ".c" AND OUTPUTEXT set(PNG_PREFIX_DEF "-DPNG_PREFIX=${PNG_PREFIX}") endif() - execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" + execute_process(COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_COMPILER_ARG1} "-E" ${CMAKE_C_FLAGS} ${PLATFORM_C_FLAGS} "-I${SRCDIR}"