diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-06-27 10:58:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-11-25 22:01:21 (GMT) |
commit | 89ba7b0046622eec7cdf44b64f666ce6e79d94f0 (patch) | |
tree | 9224b7e91817000bf4203d71f2c43f9a95b0a05a /Modules/Compiler | |
parent | da6b86f4f031b189768dc474721145a1b99f71ea (diff) | |
download | CMake-89ba7b0046622eec7cdf44b64f666ce6e79d94f0.zip CMake-89ba7b0046622eec7cdf44b64f666ce6e79d94f0.tar.gz CMake-89ba7b0046622eec7cdf44b64f666ce6e79d94f0.tar.bz2 |
Update the Clang pattern to specify compiler options.
In Clang 3.4, the preferred (and new) option pattern is --target=.
http://thread.gmane.org/gmane.comp.compilers.clang.devel/29975
http://llvm.org/viewvc/llvm-project?view=revision&revision=184408
Clang 3.4 is not yet released, but there is a release candidate, and
there is a dashboard test of Clang trunk.
Diffstat (limited to 'Modules/Compiler')
-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() |