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.
This commit is contained in:
Stephen Kelly 2013-06-27 12:58:58 +02:00
parent da6b86f4f0
commit 89ba7b0046
1 changed files with 7 additions and 2 deletions

View File

@ -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()