From 7216e0a01adbf91a334dd31d2e1bf5c5c931f262 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 8 Oct 2010 10:34:59 +0200 Subject: [PATCH] CMake: another fortran fix --- CMakeLists.txt | 52 +++++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6369b03c57..31b6e22af3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,27 +475,6 @@ if(NOT GMX_SYSTEM_XDR) set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_INTERNAL_XDR") endif(NOT GMX_SYSTEM_XDR) -if(GMX_FORTRAN OR GMX_POWER6) - enable_language(Fortran) - include(FortranCInterface) - discover_fortran_mangling(prefix isupper suffix extra_under_score found) - if(extra_under_score) - set(extrasuffix "_") - endif(extra_under_score) - - if(isupper) - set(F77_FUNCDEF "${prefix} ## NAME ## ${suffix}") - set(F77_FUNCDEF_ "${prefix} ## NAME ## ${suffix}${extrasuffix}") - else(isupper) - set(F77_FUNCDEF "${prefix} ## name ## ${suffix}") - set(F77_FUNCDEF_ "${prefix} ## name ## ${suffix}${extrasuffix}") - endif(isupper) -else(GMX_FORTRAN OR GMX_POWER6) - set(F77_FUNCDEF "name ## _") - set(F77_FUNCDEF_ "name ## _") -endif(GMX_FORTRAN OR GMX_POWER6) - - # Process nonbonded accelerated kernels settings string(TOUPPER ${GMX_ACCELERATION} ${GMX_ACCELERATION}) if(${GMX_ACCELERATION} STREQUAL "NONE") @@ -550,16 +529,31 @@ else(${GMX_ACCELERATION} STREQUAL "NONE") MESSAGE(FATAL_ERROR "Unrecognized option for accelerated kernels: ${GMX_ACCELERATION}. Pick one of auto, none, SSE, Fortran, BlueGene, Power6, ia64, altivec") endif(${GMX_ACCELERATION} STREQUAL "NONE") - -if(GMX_FORTRAN) +if(GMX_FORTRAN OR GMX_POWER6) if (GMX_THREADS) - message(FATAL_ERROR "FORTRAN is incompatible with threads and only provides a speed-up on certain IBM compilers. Disable FORTRAN (or threads if you really want to use FORTRAN kernels).") - endif() -endif() - - - + message(FATAL_ERROR "FORTRAN/POWER6 is incompatible with threads and only provides a speed-up on certain IBM compilers. Disable FORTRAN (or threads if you really want to use FORTRAN kernels).") + endif(GMX_THREADS) + enable_language(Fortran) + include(FortranCInterface) + discover_fortran_mangling(prefix isupper suffix extra_under_score found) + if(extra_under_score) + set(extrasuffix "_") + endif(extra_under_score) + if(prefix) + set(prefix "${prefix} ##") + endif(prefix) + if(isupper) + set(F77_FUNCDEF "${prefix} NAME ## ${suffix}") + set(F77_FUNCDEF_ "${prefix} NAME ## ${suffix}${extrasuffix}") + else(isupper) + set(F77_FUNCDEF "${prefix} name ## ${suffix}") + set(F77_FUNCDEF_ "${prefix} name ## ${suffix}${extrasuffix}") + endif(isupper) +else(GMX_FORTRAN OR GMX_POWER6) + set(F77_FUNCDEF "name ## _") + set(F77_FUNCDEF_ "name ## _") +endif(GMX_FORTRAN OR GMX_POWER6) # Process QM/MM Settings string(TOUPPER ${GMX_QMMM_PROGRAM} ${GMX_QMMM_PROGRAM}) -- 2.11.4.GIT