mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
Add compiler target compile options.
For clang, this allows passing -target <triple> to the compiler, and
for qcc, -V<arch> using toolchain files containing something like
set(triple arm-linux-gnueabihf)
set(CMAKE_C_COMPILER "/usr/bin/clang")
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
set(CMAKE_CXX_COMPILER_TARGET ${triple})
or
set(arch gcc_ntoarmv7le)
set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc)
set(CMAKE_C_COMPILER_TARGET ${arch})
set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC)
set(CMAKE_CXX_COMPILER_TARGET ${arch})
Both clang and qcc are inherently cross compiler( driver)s.
This commit is contained in:
@@ -13,6 +13,9 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
||||
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
||||
# http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples
|
||||
set(CMAKE_C_COMPILE_OPTION_TARGET "-V")
|
||||
set(CMAKE_CXX_COMPILE_OPTION_TARGET "-V")
|
||||
|
||||
# Shared libraries with no builtin soname may not be linked safely by
|
||||
# specifying the file path.
|
||||
|
||||
Reference in New Issue
Block a user