aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/GetCompileFlags.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/GetCompileFlags.cmake b/cmake/GetCompileFlags.cmake
index 2238744a66..49b57f6f75 100644
--- a/cmake/GetCompileFlags.cmake
+++ b/cmake/GetCompileFlags.cmake
@@ -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}"