diff options
author | Brad King <brad.king@kitware.com> | 2014-11-07 21:24:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-07 21:29:51 (GMT) |
commit | 7f89552a8fc0a3877b9630fdb022eb5f16bc77a3 (patch) | |
tree | c18cc8f6133c08df1a1d7f97e2f048fce9496db7 | |
parent | 0c3ddf8b652311ec2a9447a9e6303691841628b4 (diff) | |
download | CMake-7f89552a8fc0a3877b9630fdb022eb5f16bc77a3.zip CMake-7f89552a8fc0a3877b9630fdb022eb5f16bc77a3.tar.gz CMake-7f89552a8fc0a3877b9630fdb022eb5f16bc77a3.tar.bz2 |
Xcode: Fix compiler path detection for iOS tools on Xcode <= 5.0 (#15237)
Since commit v3.1.0-rc1~1^2~1 (Xcode: Fix compiler id detection for iOS
tools, 2014-10-22) our compiler id detection project sets the product
type to 'com.apple.product-type.bundle.unit-test'. This causes the Ld
command line on which we match the path to the compiler to have a
'CompilerIdC.xctest/' component. The commit updated our regex to match
this, but placed it before the extra './' component that Xcode 5.0 and
below produce. Xcode <= 5.0 prints '/./CompilerIdC.xctest/', so switch
the order of the two components in the regex to match it.
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 613f4b3..6c6a914 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -307,7 +307,7 @@ Id flags: ${testflags} # ... # /path/to/cc ...CompilerId${lang}/... # to extract the compiler front-end for the language. - if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}(/CompilerId${lang}.xctest)?/(\\./)?CompilerId${lang}[ \t\n\\\"]") + if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/(\\./)?(CompilerId${lang}.xctest/)?CompilerId${lang}[ \t\n\\\"]") set(_comp "${CMAKE_MATCH_2}") if(EXISTS "${_comp}") set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) |