cmake/GetCompileFlags: include CMAKE_C_COMPILER_ARG1 (#11091)

This is used internally (e.g. on Travis) for 32-bit builds (`-m32`).
This commit is contained in:
Daniel Hahler
2019-09-25 00:09:23 +02:00
committed by GitHub
parent 0ab7da8561
commit 81b19df5f2

View File

@ -3,6 +3,13 @@ function(get_compile_flags _compile_flags)
set(compile_flags "<CMAKE_C_COMPILER> <CFLAGS> <BUILD_TYPE_CFLAGS> <COMPILE_OPTIONS><COMPILE_DEFINITIONS> <INCLUDES>")
# Get C compiler.
if(CMAKE_C_COMPILER_ARG1)
string(REPLACE
"<CMAKE_C_COMPILER>"
"<CMAKE_C_COMPILER> ${CMAKE_C_COMPILER_ARG1}"
compile_flags
"${compile_flags}")
endif()
string(REPLACE
"<CMAKE_C_COMPILER>"
"${CMAKE_C_COMPILER}"