diff options
author | Brad King <brad.king@kitware.com> | 2013-11-26 14:38:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-26 14:38:55 (GMT) |
commit | 8b585eed447603579c438e7ff5216927cf6b0a69 (patch) | |
tree | 723c2bb0892130a460a5f0d84300e41d0be3f58b | |
parent | 3eca31f81a623e91e1b76fd6012a0645aa8d6432 (diff) | |
parent | 89ba7b0046622eec7cdf44b64f666ce6e79d94f0 (diff) | |
download | CMake-8b585eed447603579c438e7ff5216927cf6b0a69.zip CMake-8b585eed447603579c438e7ff5216927cf6b0a69.tar.gz CMake-8b585eed447603579c438e7ff5216927cf6b0a69.tar.bz2 |
Merge topic 'cross-compiling-toolchain-variables'
89ba7b0 Update the Clang pattern to specify compiler options.
-rw-r--r-- | Modules/Compiler/Clang.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 055aad6..eeba119 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -30,7 +30,12 @@ else() set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") - set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-target ") - set(CMAKE_${lang}_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN "-gcc-toolchain ") + if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4.0) + set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-target ") + set(CMAKE_${lang}_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN "-gcc-toolchain ") + else() + set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "--target=") + set(CMAKE_${lang}_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN "--gcc-toolchain=") + endif() endmacro() endif() |