diff options
author | Brad King <brad.king@kitware.com> | 2014-09-05 16:06:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-09-05 16:06:52 (GMT) |
commit | d2364f15ae537654b71ec151cb0e742ce9ca931a (patch) | |
tree | c45a27c34498302b0bd2599ff434f0b19cb88c32 /Modules | |
parent | a1eb90c85d80acf9617ccac73a45b6753188947d (diff) | |
parent | 72d6681826840c0a14be61d19c71a55f280d38ae (diff) | |
download | CMake-d2364f15ae537654b71ec151cb0e742ce9ca931a.zip CMake-d2364f15ae537654b71ec151cb0e742ce9ca931a.tar.gz CMake-d2364f15ae537654b71ec151cb0e742ce9ca931a.tar.bz2 |
Merge branch 'fix-clang-cross-compile-find-binutils' into release
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 4 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index aa4cdc9..2b8ecdc 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -136,7 +136,9 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) 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}-) + if(CMAKE_C_COMPILER_TARGET) + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-) + endif() elseif(COMPILER_BASENAME MATCHES "qcc(\\.exe)?$") if(CMAKE_C_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?.*$") set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index ef8445e..9af1de1 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -133,7 +133,9 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) if (COMPILER_BASENAME MATCHES "^(.+-)(clan)?[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_CXX_COMPILER_TARGET}-) + if(CMAKE_CXX_COMPILER_TARGET) + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_CXX_COMPILER_TARGET}-) + endif() elseif(COMPILER_BASENAME MATCHES "QCC(\\.exe)?$") if(CMAKE_CXX_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?.*$") set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-) |