summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-27 10:58:58 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-25 22:01:21 (GMT)
commit89ba7b0046622eec7cdf44b64f666ce6e79d94f0 (patch)
tree9224b7e91817000bf4203d71f2c43f9a95b0a05a /Modules/Compiler
parentda6b86f4f031b189768dc474721145a1b99f71ea (diff)
downloadCMake-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.cmake9
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()