Commit 20e14baa authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'autogen-moc-predef-cross-compile'

66f49d1f Android: Add clang --target= flag to compiler predefines command
39534c58

 Autogen: Add clang --target= flag to compiler predefines command
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: André Klitzing's avatarAndré Klitzing <aklitzing@gmail.com>
Merge-request: !2452
parents e3666e8f 66f49d1f
Pipeline #120585 failed with stage
in 0 seconds
......@@ -33,6 +33,14 @@ else()
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Xlinker" " ")
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP)
if(CMAKE_${lang}_COMPILER_TARGET)
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4.0)
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-target" "${CMAKE_${lang}_COMPILER_TARGET}")
else()
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
endif()
endif()
set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
......
......@@ -40,5 +40,6 @@ macro(__android_compiler_clang lang)
endif()
if(NOT CMAKE_${lang}_COMPILER_TARGET)
set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}")
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
endif()
endmacro()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment