CMake/Modules/Platform
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
..
AIX-GNU-ASM.cmake Add ASM platform information for GNU compiler on AIX (#13390) 2012-07-10 15:18:55 -04:00
AIX-GNU-C.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
AIX-GNU-CXX.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
AIX-GNU-Fortran.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
AIX-GNU.cmake Merge topic 'aix-shared-flags' 2013-03-12 13:47:04 -04:00
AIX-VisualAge-C.cmake Split XL compiler information files 2009-09-30 09:37:35 -04:00
AIX-VisualAge-CXX.cmake Split XL compiler information files 2009-09-30 09:37:35 -04:00
AIX-VisualAge-Fortran.cmake XL: Fix old VisualAge branding of Fortran compiler 2011-08-02 17:26:29 -04:00
AIX-XL-ASM.cmake Add ASM platform information for XL compiler on AIX 2011-03-02 13:48:04 -05:00
AIX-XL-C.cmake Factor AIX and XL compiler flags into common module 2011-03-02 11:20:50 -05:00
AIX-XL-CXX.cmake Factor AIX and XL compiler flags into common module 2011-03-02 11:20:50 -05:00
AIX-XL-Fortran.cmake Factor AIX and XL compiler flags into common module 2011-03-02 11:20:50 -05:00
AIX-XL.cmake AIX: Do not use -brtl to create shared libraries (#13997) 2013-03-11 09:01:27 -04:00
AIX.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
BSDOS.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
BeOS.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
BlueGeneL.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
BlueGeneP-base.cmake Add platform variables for position independent code flags 2012-06-12 15:37:53 -04:00
BlueGeneP-dynamic-GNU-C.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-dynamic-GNU-CXX.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-dynamic-GNU-Fortran.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-dynamic-XL-C.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-dynamic-XL-CXX.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-dynamic-XL-Fortran.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-dynamic.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static-GNU-C.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static-GNU-CXX.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static-GNU-Fortran.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static-XL-C.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static-XL-CXX.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static-XL-Fortran.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
BlueGeneP-static.cmake Add platform files for BlueGene/P systems 2010-08-13 12:17:57 -04:00
CYGWIN-CXX.cmake Prefer generic system compilers by default for C, C++, and Fortran 2012-08-02 13:26:01 -04:00
CYGWIN-GNU-C.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
CYGWIN-GNU-CXX.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
CYGWIN-GNU-Fortran.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
CYGWIN-GNU.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CYGWIN-windres.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CYGWIN.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Catamount.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Darwin-Absoft-Fortran.cmake OS X: Add Fortran library version flags (#14249) 2013-07-16 09:27:50 -04:00
Darwin-AppleClang-C.cmake Clang: Add separate "AppleClang" compiler id 2013-10-07 20:12:46 -04:00
Darwin-AppleClang-CXX.cmake Clang: Add separate "AppleClang" compiler id 2013-10-07 20:12:46 -04:00
Darwin-CXX.cmake Prefer generic system compilers by default for C, C++, and Fortran 2012-08-02 13:26:01 -04:00
Darwin-Clang-C.cmake OS X: Add platform-specific Clang compiler info files (#13536) 2012-09-17 15:36:41 -04:00
Darwin-Clang-CXX.cmake OS X: Add platform-specific Clang compiler info files (#13536) 2012-09-17 15:36:41 -04:00
Darwin-Clang.cmake OS X: Detect implicit link directories on modern toolchains 2012-12-11 15:15:51 -05:00
Darwin-GNU-C.cmake OS X: Always generate -isysroot if any SDK is in use 2012-09-21 08:53:42 -04:00
Darwin-GNU-CXX.cmake OS X: Always generate -isysroot if any SDK is in use 2012-09-21 08:53:42 -04:00
Darwin-GNU-Fortran.cmake OS X: Add Fortran library version flags (#14249) 2013-07-16 09:27:50 -04:00
Darwin-GNU.cmake OS X: Detect implicit link directories on modern toolchains 2012-12-11 15:15:51 -05:00
Darwin-Intel-Fortran.cmake OS X: Add Fortran library version flags (#14249) 2013-07-16 09:27:50 -04:00
Darwin-NAG-Fortran.cmake OS X: Add Fortran library version flags (#14249) 2013-07-16 09:27:50 -04:00
Darwin-VisualAge-C.cmake Split XL compiler information files 2009-09-30 09:37:35 -04:00
Darwin-VisualAge-CXX.cmake Split XL compiler information files 2009-09-30 09:37:35 -04:00
Darwin-XL-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Darwin-XL-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Darwin-icc.cmake Drop compatibility with CMake < 2.4 2013-10-23 08:54:31 -04:00
Darwin-icpc.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Darwin.cmake Drop compatibility with CMake < 2.4 2013-10-23 08:54:31 -04:00
DragonFly.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
FreeBSD.cmake BSD: Do not require dlfcn.h to build shared libs (#13573) 2012-10-05 10:08:28 -04:00
GNU.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
GNUtoMS_lib.bat.in Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib 2011-12-05 18:13:49 -05:00
GNUtoMS_lib.cmake Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib 2011-12-05 18:13:49 -05:00
Generic-ADSP-ASM.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Generic-ADSP-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Generic-ADSP-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Generic-ADSP-Common.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Generic-SDCC-C.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Generic.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
HP-UX-GNU-C.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
HP-UX-GNU-CXX.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
HP-UX-GNU-Fortran.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
HP-UX-GNU.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
HP-UX-HP-ASM.cmake HP: Drive shared library linking with compiler front end 2011-12-14 09:32:27 -05:00
HP-UX-HP-C.cmake HP: Drive shared library linking with compiler front end 2011-12-14 09:32:27 -05:00
HP-UX-HP-CXX.cmake HP: Drive shared library linking with compiler front end 2011-12-14 09:32:27 -05:00
HP-UX-HP-Fortran.cmake HP: Drive shared library linking with compiler front end 2011-12-14 09:32:27 -05:00
HP-UX-HP.cmake Add platform variables for position independent code flags 2012-06-12 15:37:53 -04:00
HP-UX.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Haiku.cmake Haiku: Several fixes to platform module 2013-10-08 09:54:46 -04:00
IRIX.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
IRIX64.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Linux-Absoft-Fortran.cmake Absoft: Detect implicit link libraries on Linux and Mac 2011-05-20 08:57:51 -04:00
Linux-CXX.cmake Prefer generic system compilers by default for C, C++, and Fortran 2012-08-02 13:26:01 -04:00
Linux-Clang-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-Clang-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-GNU-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-GNU-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-GNU-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-GNU.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Linux-Intel-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-Intel-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-Intel-Fortran.cmake Intel: Drop deprecated -i_dynamic flag from Fortran (#14507) 2013-10-24 09:29:43 -04:00
Linux-Intel.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Linux-NAG-Fortran.cmake Add NAG Fortran compiler information files 2010-12-09 18:12:34 -05:00
Linux-PGI-C.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
Linux-PGI-CXX.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
Linux-PGI-Fortran.cmake Generalize support for Portland Group Compiler 2009-12-04 10:21:57 -05:00
Linux-PGI.cmake Add platform variables for position independent code flags 2012-06-12 15:37:53 -04:00
Linux-PathScale-C.cmake Add PathScale shared library flags on Linux 2010-01-21 09:09:27 -05:00
Linux-PathScale-CXX.cmake Add PathScale shared library flags on Linux 2010-01-21 09:09:27 -05:00
Linux-PathScale-Fortran.cmake Add PathScale shared library flags on Linux 2010-01-21 09:09:27 -05:00
Linux-PathScale.cmake Add platform variables for position independent code flags 2012-06-12 15:37:53 -04:00
Linux-SunPro-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-TinyCC-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-VisualAge-C.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
Linux-VisualAge-CXX.cmake Fix XL C++ compiler flags on Linux 2009-09-16 12:33:24 -04:00
Linux-VisualAge-Fortran.cmake Teach compiler id about VisualAge -> XL rebranding 2009-08-07 10:13:07 -04:00
Linux-XL-C.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-XL-CXX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-XL-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux-como.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Linux.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
MP-RAS.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
NetBSD.cmake BSD: Do not require dlfcn.h to build shared libs (#13573) 2012-10-05 10:08:28 -04:00
OSF1.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
OpenBSD.cmake OpenBSD: Install shared libraries without executable permission 2012-12-04 08:25:33 -05:00
OpenVMS.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
QNX.cmake Add compiler target compile options. 2013-11-19 12:38:53 -05:00
RISCos.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
SCO_SV.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
SINIX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
SunOS-GNU-C.cmake Fix GNU C and Fortran flags on SunOS 2009-12-04 08:51:46 -05:00
SunOS-GNU-CXX.cmake Split GNU compiler information files 2009-12-02 09:52:00 -05:00
SunOS-GNU-Fortran.cmake Fix GNU C and Fortran flags on SunOS 2009-12-04 08:51:46 -05:00
SunOS-GNU.cmake Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
SunOS.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Tru64.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
ULTRIX.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
UNIX_SV.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
UnixPaths.cmake Allow disabling adding the install prefix to the prefix search path. 2013-10-31 16:40:24 +01:00
UnixWare.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Windows-Borland-C.cmake Recognize Embarcadero compiler (#12604) 2012-02-20 10:09:44 -05:00
Windows-Borland-CXX.cmake Recognize Embarcadero compiler (#12604) 2012-02-20 10:09:44 -05:00
Windows-CXX.cmake Prefer generic system compilers by default for C, C++, and Fortran 2012-08-02 13:26:01 -04:00
Windows-Clang-C.cmake Clang: Support Windows variants for GNU and MSVC (#13035, #14458) 2013-10-04 13:39:22 -04:00
Windows-Clang-CXX.cmake Clang: Support Windows variants for GNU and MSVC (#13035, #14458) 2013-10-04 13:39:22 -04:00
Windows-Clang.cmake Clang: Support Windows variants for GNU and MSVC (#13035, #14458) 2013-10-04 13:39:22 -04:00
Windows-Embarcadero-C.cmake Recognize Embarcadero compiler (#12604) 2012-02-20 10:09:44 -05:00
Windows-Embarcadero-CXX.cmake Recognize Embarcadero compiler (#12604) 2012-02-20 10:09:44 -05:00
Windows-Embarcadero.cmake Embarcadero: Use response files only for includes, objects, and libs 2013-06-27 12:57:31 -04:00
Windows-G95-Fortran.cmake Teach CMake how to work with G95 on mingw. 2010-03-23 11:32:40 -04:00
Windows-GNU-C-ABI.cmake Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib 2011-12-05 18:13:49 -05:00
Windows-GNU-C.cmake Modernize GNU compiler info on Windows 2009-12-02 11:27:59 -05:00
Windows-GNU-CXX-ABI.cmake Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib 2011-12-05 18:13:49 -05:00
Windows-GNU-CXX.cmake Modernize GNU compiler info on Windows 2009-12-02 11:27:59 -05:00
Windows-GNU-Fortran-ABI.cmake Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib 2011-12-05 18:13:49 -05:00
Windows-GNU-Fortran.cmake Fortran: Detect pointer size in gfortran on MinGW 2011-12-05 16:32:29 -05:00
Windows-GNU.cmake Find mingw's windres also when Unix Makefiles are used 2012-08-27 16:54:21 +02:00
Windows-Intel-ASM.cmake Add support for the Intel compiler used for ASM under Windows 2011-03-02 16:46:25 +01:00
Windows-Intel-C.cmake Modernize Intel compiler info on Windows 2010-12-16 09:50:05 -05:00
Windows-Intel-CXX.cmake Intel: When simulating MSVC, re-use Windows-MSVC (#14476) 2013-10-18 09:55:59 -04:00
Windows-Intel-Fortran.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Windows-Intel.cmake Intel: When simulating MSVC, re-use Windows-MSVC (#14476) 2013-10-18 09:55:59 -04:00
Windows-MSVC-C.cmake MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492) 2013-10-18 10:28:28 -04:00
Windows-MSVC-CXX.cmake MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492) 2013-10-18 10:28:28 -04:00
Windows-MSVC.cmake Merge topic 'vs12-parallel-cl-FS' 2013-10-21 09:02:09 -04:00
Windows-NMcl.cmake ENH: add platform file for bounds checker 2008-08-15 15:07:56 -04:00
Windows-df.cmake VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators 2013-05-13 11:07:46 -04:00
Windows-wcl386.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Windows-windres.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Windows.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
WindowsCE-MSVC-C.cmake Add WindowsCE platform information files 2012-09-05 07:38:45 -04:00
WindowsCE-MSVC-CXX.cmake Add WindowsCE platform information files 2012-09-05 07:38:45 -04:00
WindowsCE-MSVC.cmake Add WindowsCE platform information files 2012-09-05 07:38:45 -04:00
WindowsCE.cmake Add WindowsCE platform information files 2012-09-05 07:38:45 -04:00
WindowsPaths.cmake Allow disabling adding the install prefix to the prefix search path. 2013-10-31 16:40:24 +01:00
Xenix.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
eCos.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
gas.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
kFreeBSD.cmake Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
syllable.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00