diff options
author | Brad King <brad.king@kitware.com> | 2015-06-29 15:19:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-30 14:14:08 (GMT) |
commit | 99d160385e22ab7bd8e712d5a58460940573cfcd (patch) | |
tree | 1c46739797b220168ca6b3f900ddd40fa879dbf1 /Modules/CMakeDetermineFortranCompiler.cmake | |
parent | bbfebcbc13df87173dd8cb59cd34e1e0b3e1c0cc (diff) | |
download | CMake-99d160385e22ab7bd8e712d5a58460940573cfcd.zip CMake-99d160385e22ab7bd8e712d5a58460940573cfcd.tar.gz CMake-99d160385e22ab7bd8e712d5a58460940573cfcd.tar.bz2 |
CMakeDetermineCompilerId: Use per-language regex to match Xcode compiler tool
Move the Ld invocation match expression from CMakeDetermineCompilerId
into CMakeDetermine{C,CXX,Fortran}Compiler so that it can be specified
on a per-language basis.
Diffstat (limited to 'Modules/CMakeDetermineFortranCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineFortranCompiler.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 52ec25a..911ffac 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -127,6 +127,14 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN) set(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_NAG "-V") set(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_NAG "NAG Fortran Compiler") + # Match the link line from xcodebuild output of the form + # Ld ... + # ... + # /path/to/cc ...CompilerIdFortran/... + # to extract the compiler front-end for the language. + set(CMAKE_Fortran_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdFortran/(\\./)?(CompilerIdFortran.xctest/)?CompilerIdFortran[ \t\n\\\"]") + set(CMAKE_Fortran_COMPILER_ID_TOOL_MATCH_INDEX 2) + set(_version_info "") foreach(m MAJOR MINOR PATCH TWEAK) set(_COMP "_${m}") |