diff options
author | Brad King <brad.king@kitware.com> | 2013-11-19 17:41:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-19 17:41:57 (GMT) |
commit | 46ec48c93d2d84cf79c8704c370e24d47a7536a5 (patch) | |
tree | 83dae82226242d9f31dfc8f77edf791d34cc65b4 /Modules/CMakeDetermineCCompiler.cmake | |
parent | 1da77bf1ee4f3ba315ebb00da2eaeac474614cad (diff) | |
parent | 7cd65c97fabd9f3249739a81dd1260a1e0b59ee1 (diff) | |
download | CMake-46ec48c93d2d84cf79c8704c370e24d47a7536a5.zip CMake-46ec48c93d2d84cf79c8704c370e24d47a7536a5.tar.gz CMake-46ec48c93d2d84cf79c8704c370e24d47a7536a5.tar.bz2 |
Merge topic 'cross-compiling-toolchain-variables'
7cd65c9 Add CMAKE_SYSROOT variable to set --sysroot when cross compiling.
5096967 Allow toolchain files to specify an external toolchain.
76552d5 Add compiler target compile options.
f41ecd1 CMakeDetermineCompilerId: Look for internal file only on host
Diffstat (limited to 'Modules/CMakeDetermineCCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 0d47a60..438a98a 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -158,6 +158,12 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME) if (COMPILER_BASENAME MATCHES "^(.+-)(clang|g?cc)(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-) + elseif(COMPILER_BASENAME MATCHES "qcc(\\.exe)?$") + if(CMAKE_C_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?.*$") + set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-) + endif() endif () # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils |