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.
This commit is contained in:
parent
0c3ddf8b65
commit
7f89552a8f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue