CMake/Modules/Compiler
Stephen Kelly 76552d595d 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.

When cross-compiling with clang, use the CMAKE_${lang}_COMPILER_TARGET
as the _CMAKE_TOOLCHAIN_PREFIX to find the appropriate binutils.

When cross-compiling with QNX qcc, use the CMAKE_${lang}_COMPILER_TARGET
to set the appropriate _CMAKE_TOOLCHAIN_PREFIX.
2013-11-19 12:38:53 -05:00
..
Absoft-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
AppleClang-ASM.cmake Clang: Add separate "AppleClang" compiler id 2013-10-07 20:12:46 -04:00
AppleClang-C.cmake Clang: Add separate "AppleClang" compiler id 2013-10-07 20:12:46 -04:00
AppleClang-CXX.cmake Clang: Add separate "AppleClang" compiler id 2013-10-07 20:12:46 -04:00
Clang-ASM.cmake Clang: Split Compiler/Clang* modules out from GNU (#13550) 2012-09-19 14:06:28 -04:00
Clang-C.cmake Clang: Split Compiler/Clang* modules out from GNU (#13550) 2012-09-19 14:06:28 -04:00
Clang-CXX.cmake Clang: Support Windows variants for GNU and MSVC (#13035, #14458) 2013-10-04 13:39:22 -04:00
Clang.cmake Add compiler target compile options. 2013-11-19 12:38:53 -05:00
Cray-C.cmake Teach CMake about Cray C, C++, and Fortran compilers 2010-11-12 09:12:08 -05:00
Cray-CXX.cmake Teach CMake about Cray C, C++, and Fortran compilers 2010-11-12 09:12:08 -05:00
Cray-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
G95-Fortran.cmake Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
GNU-ASM.cmake Change the default rules so they fit better to the new ASM handling 2011-02-23 21:21:41 +01:00
GNU-C.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
GNU-CXX.cmake Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 2013-06-02 12:00:51 +02:00
GNU-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
GNU.cmake Revert "Use --sysroot when cross compiling." 2013-07-12 15:44:38 +02:00
HP-ASM.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
HP-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
HP-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
HP-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
IAR-ASM.cmake Add support files for C, C++ and ASM for the IAR toolchain. 2013-04-15 09:11:17 -04:00
IAR-C.cmake Add support files for C, C++ and ASM for the IAR toolchain. 2013-04-15 09:11:17 -04:00
IAR-CXX.cmake Add support files for C, C++ and ASM for the IAR toolchain. 2013-04-15 09:11:17 -04:00
IAR.cmake Add support files for C, C++ and ASM for the IAR toolchain. 2013-04-15 09:11:17 -04:00
Intel-ASM.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
Intel-C.cmake Ninja: add depfile support for Intel's compiler 2013-11-04 13:29:19 +01:00
Intel-CXX.cmake Ninja: add depfile support for Intel's compiler 2013-11-04 13:29:19 +01:00
Intel-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
MIPSpro-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
MIPSpro-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
MIPSpro-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
NAG-Fortran.cmake NAG: Use -PIC for Fortran position-independent code (#13932) 2013-02-18 13:12:50 -05:00
PGI-C.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
PGI-CXX.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
PGI-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
PGI.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
PathScale-C.cmake PathScale C/C++/Fortran Compiler Information 2010-01-13 12:14:31 -05:00
PathScale-CXX.cmake PathScale C/C++/Fortran Compiler Information 2010-01-13 12:14:31 -05:00
PathScale-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
PathScale.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
SCO-C.cmake Factor SCO compiler info out of platform file (#11700) 2011-01-17 09:57:17 -05:00
SCO-CXX.cmake Factor SCO compiler info out of platform file (#11700) 2011-01-17 09:57:17 -05:00
SCO.cmake Add platform variable for flags specific to shared libraries 2012-06-12 15:38:48 -04:00
SunPro-ASM.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
SunPro-C.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
SunPro-CXX.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
SunPro-Fortran.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
TI-ASM.cmake rename TI_DSP toolchain to TI, since it works also for the ARM compiler 2013-03-14 21:47:59 +01:00
TI-C.cmake rename TI_DSP toolchain to TI, since it works also for the ARM compiler 2013-03-14 21:47:59 +01:00
TI-CXX.cmake rename TI_DSP toolchain to TI, since it works also for the ARM compiler 2013-03-14 21:47:59 +01:00
TinyCC-C.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
VisualAge-C.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
VisualAge-CXX.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
VisualAge-Fortran.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
XL-ASM.cmake Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it. 2012-08-15 20:00:45 -06:00
XL-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
XL-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
XL-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
XL.cmake XL: Use -qpic for position independent code (#14010) 2013-03-13 13:49:48 -04:00