From 12b25df882968b4f5807f2734c98847337d518a9 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Thu, 14 Mar 2013 19:33:58 +0100 Subject: Determine C/CXX/Fortran compiler: fix indentation Alex --- Modules/CMakeDetermineCCompiler.cmake | 20 ++++++++++---------- Modules/CMakeDetermineCXXCompiler.cmake | 20 ++++++++++---------- Modules/CMakeDetermineFortranCompiler.cmake | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index d564b1b..736fc89 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -148,16 +148,16 @@ endif () if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") - get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME) - if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) - endif () - - # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils - # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) - if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) - endif () + get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME) + if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () + + # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils + # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) + if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () endif() endif () diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 3523f8d..c128cfa 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -146,16 +146,16 @@ endif () if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME) - if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) - endif () - - # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils - # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) - if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) - endif () + get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME) + if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () + + # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils + # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) + if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () endif() endif () diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index b37ebfe..4d3fb90 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -203,16 +203,16 @@ endif () if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") - get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME) - if (COMPILER_BASENAME MATCHES "^(.+-)g?fortran(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) - endif () - - # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils - # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) - if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") - set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) - endif () + get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME) + if (COMPILER_BASENAME MATCHES "^(.+-)g?fortran(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () + + # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils + # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.) + if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$") + set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) + endif () endif() endif () -- cgit v0.12