summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-26 14:38:55 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-26 14:38:55 (GMT)
commit8b585eed447603579c438e7ff5216927cf6b0a69 (patch)
tree723c2bb0892130a460a5f0d84300e41d0be3f58b /Modules
parent3eca31f81a623e91e1b76fd6012a0645aa8d6432 (diff)
parent89ba7b0046622eec7cdf44b64f666ce6e79d94f0 (diff)
downloadCMake-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.
Diffstat (limited to 'Modules')
-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()