Skip to content

Commit 81b19df

Browse files
authored
cmake/GetCompileFlags: include CMAKE_C_COMPILER_ARG1 (neovim#11091)
This is used internally (e.g. on Travis) for 32-bit builds (`-m32`).
1 parent 0ab7da8 commit 81b19df

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/GetCompileFlags.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ function(get_compile_flags _compile_flags)
33
set(compile_flags "<CMAKE_C_COMPILER> <CFLAGS> <BUILD_TYPE_CFLAGS> <COMPILE_OPTIONS><COMPILE_DEFINITIONS> <INCLUDES>")
44

55
# Get C compiler.
6+
if(CMAKE_C_COMPILER_ARG1)
7+
string(REPLACE
8+
"<CMAKE_C_COMPILER>"
9+
"<CMAKE_C_COMPILER> ${CMAKE_C_COMPILER_ARG1}"
10+
compile_flags
11+
"${compile_flags}")
12+
endif()
613
string(REPLACE
714
"<CMAKE_C_COMPILER>"
815
"${CMAKE_C_COMPILER}"

0 commit comments

Comments
 (0)