Cleaned up endif/else-s in CMakeLists.txt and *.cmake files
authorRossen Apostolov <rossen@kth.se>
Fri, 7 Mar 2014 18:14:03 +0000 (19:14 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 17 Mar 2014 20:28:15 +0000 (21:28 +0100)
Removed FindBLAS/LAPACK.cmake files which come anyway with
CMake > 2.8.8. Included properly the licenses in some of the
BlueGene*.cmake files.

Change-Id: I69d68566865facf0af759526a579f32c5c444464

58 files changed:
CMakeLists.txt
CTestConfig.cmake
admin/includedeps.cmake
cmake/FindBLAS.cmake [deleted file]
cmake/FindFFTW.cmake
cmake/FindLAPACK.cmake [deleted file]
cmake/Platform/BlueGeneQ-base.cmake
cmake/Platform/BlueGeneQ-static-XL-C.cmake
cmake/Platform/BlueGeneQ-static-XL-CXX.cmake
cmake/Platform/BlueGeneQ-static.cmake
cmake/ThreadMPI.cmake
cmake/gmxCFlags.cmake
cmake/gmxDetectSimd.cmake
cmake/gmxFindFlagsForSource.cmake
cmake/gmxManageFFTLibraries.cmake
cmake/gmxManageGPU.cmake
cmake/gmxManageLinearAlgebraLibraries.cmake
cmake/gmxManageMPI.cmake
cmake/gmxManageOpenMP.cmake
cmake/gmxManageSuffixes.cmake
cmake/gmxOptionUtilities.cmake
cmake/gmxSetBuildInformation.cmake
cmake/gmxTestAVXMaskload.cmake
cmake/gmxTestFloatFormat.cmake
cmake/gmxTestInline.cmake
cmake/gmxTestInlineASM.cmake
cmake/gmxTestIsfinite.cmake
cmake/gmxTestLargeFiles.cmake
cmake/gmxTestMPI_IN_PLACE.cmake
cmake/gmxTestPipes.cmake
cmake/gmxTestRestrict.cmake
cmake/gmxTestSignal.cmake
cmake/gmxTestXDR.cmake
doxygen/CMakeLists.txt
src/CMakeLists.txt
src/external/gmock-1.7.0/CMakeLists.txt
src/gromacs/CMakeLists.txt
src/gromacs/analysisdata/CMakeLists.txt
src/gromacs/commandline/tests/CMakeLists.txt
src/gromacs/essentialdynamics/CMakeLists.txt
src/gromacs/fft/CMakeLists.txt
src/gromacs/fileio/CMakeLists.txt
src/gromacs/gmxana/CMakeLists.txt
src/gromacs/gmxlib/CMakeLists.txt
src/gromacs/gmxlib/thread_mpi/CMakeLists.txt
src/gromacs/gmxpreprocess/CMakeLists.txt
src/gromacs/math/CMakeLists.txt
src/gromacs/onlinehelp/CMakeLists.txt
src/gromacs/options/CMakeLists.txt
src/gromacs/pulling/CMakeLists.txt
src/gromacs/selection/CMakeLists.txt
src/gromacs/simd/CMakeLists.txt
src/gromacs/timing/CMakeLists.txt
src/gromacs/tools/CMakeLists.txt
src/gromacs/trajectoryanalysis/CMakeLists.txt
src/gromacs/utility/CMakeLists.txt
src/programs/CMakeLists.txt
src/testutils/TestMacros.cmake

index 2c0482094602b215654e54d40c11e8e9adb90d01..8fcbfac8137dfbae5ce5bf3216434b597adbd733 100644 (file)
@@ -63,7 +63,7 @@ set(CUSTOM_VERSION_STRING ""
 mark_as_advanced(CUSTOM_VERSION_STRING)
 if (CUSTOM_VERSION_STRING)
     set(PROJECT_VERSION ${CUSTOM_VERSION_STRING})
-endif (CUSTOM_VERSION_STRING)
+endif()
 set(LIBRARY_SOVERSION 0)
 set(LIBRARY_VERSION ${LIBRARY_SOVERSION}.0.0)
 # It is a bit irritating, but this has to be set separately for now!
@@ -208,7 +208,7 @@ gmx_detect_target_architecture()
 if(GMX_CPU_ACCELERATION)
     # Stay compatible with old Jenkins command line options for specific SIMD acceleration
     set(GMX_SIMD "${GMX_CPU_ACCELERATION}" CACHE STRING "SIMD instruction set level and compiler optimization" FORCE)
-endif(GMX_CPU_ACCELERATION)
+endif()
 
 if(NOT GMX_TARGET_MIC)
     include(gmxDetectSimd)
@@ -321,10 +321,10 @@ set(PKG_CFLAGS "")
 if(GMX_DOUBLE)
     add_definitions(-DGMX_DOUBLE)
     set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_DOUBLE")
-endif(GMX_DOUBLE)
+endif()
 if(GMX_SOFTWARE_INVSQRT)
   set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_SOFTWARE_INVSQRT")
-endif(GMX_SOFTWARE_INVSQRT)
+endif()
 
 
 
@@ -415,7 +415,7 @@ mark_as_advanced(GMX_XML)
 #    include_directories(${LIBXML2_INCLUDE_DIR})
 #    set(PKG_XML libxml-2.0)
 #    set(XML_LIBRARIES ${LIBXML2_LIBRARIES})
-#endif(GMX_XML)
+#endif()
 
 option(GMX_GSL "Add support for gsl" OFF)
 if (GMX_GSL)
@@ -425,8 +425,8 @@ if (GMX_GSL)
     include_directories(${GSL_INCLUDE_DIR})
     set(PKG_GSL gsl)
     set(HAVE_LIBGSL 1)
-  endif(GSL_FOUND)
-endif (GMX_GSL)
+  endif()
+endif()
 
 option(GMX_X11 "Use X window system" OFF)
 if (GMX_X11)
@@ -439,7 +439,7 @@ if (GMX_X11)
                 "gmx view will not be available.")
     endif()
     include_directories(${X11_INCLUDE_DIR})
-endif(GMX_X11)
+endif()
 
 include(ThreadMPI)
 set(THREAD_MPI_LIB thread_mpi)
@@ -453,7 +453,7 @@ if(GMX_THREAD_MPI)
     set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_THREAD_MPI")
     set(GMX_MPI 1)
     set(MPI_IN_PLACE_EXISTS 1)
-endif(GMX_THREAD_MPI)
+endif()
 tmpi_get_source_list(THREAD_MPI_SRC)
 # If atomics are manually disabled a define is needed because atomics.h doesn't depend on config.h
 if (TMPI_ATOMICS_DISABLED)
@@ -463,11 +463,11 @@ endif()
 if(GMX_GPU)
     # now that we have detected the dependencies, do the second configure pass
     gmx_gpu_setup()
-endif(GMX_GPU)
+endif()
 
 if(CYGWIN)
     set(GMX_CYGWIN 1)
-endif(CYGWIN)
+endif()
 
 if(WIN32 AND NOT CYGWIN)
     set(GMX_NATIVE_WINDOWS 1)
@@ -482,7 +482,7 @@ if(GMX_GIT_VERSION_INFO)
         message(FATAL_ERROR
             "Cannot generate git version information from source tree not under git. "
             "Set GMX_GIT_VERSION_INFO=OFF to proceed.")
-    endif ()
+    endif()
     # We need at least git v1.5.3 be able to parse git's date output. If not
     # found or the version is too small, we can't generate version information.
     find_package(Git)
@@ -614,7 +614,7 @@ include(gmxTestXDR)
 gmx_test_xdr(GMX_SYSTEM_XDR)
 if(NOT GMX_SYSTEM_XDR)
     set(GMX_INTERNAL_XDR 1)
-endif(NOT GMX_SYSTEM_XDR)
+endif()
 
 
 ##################################################
@@ -679,7 +679,7 @@ if(GMX_LOAD_PLUGINS)
   else()
     set(PKG_DL_LIBS)
   endif()
-endif(GMX_LOAD_PLUGINS)
+endif()
 set(VMD_QUIETLY TRUE CACHE INTERNAL "")
 
 # Link real-time library for POSIX timers. The check for clock_gettime
@@ -691,7 +691,7 @@ endif()
 # Math and thread libraries must often come after all others when linking...
 if(HAVE_LIBM)
     list(APPEND GMX_EXTRA_LIBRARIES m)
-endif(HAVE_LIBM)
+endif()
 
 option(GMX_NACL "Configure for Native Client builds" OFF)
 if (GMX_NACL)
@@ -706,7 +706,7 @@ if(GMX_FAHCORE)
   set(COREWRAP_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../corewrap" CACHE STRING
       "Path to swindirect.h")
   include_directories(${COREWRAP_INCLUDE_DIR})
-endif(GMX_FAHCORE)
+endif()
 
 option(GMX_BUILD_HELP "Build man pages, HTML help, and completions automatically (requires that compiled binaries can be executed on the build host)" OFF)
 mark_as_advanced(GMX_BUILD_HELP)
@@ -807,7 +807,7 @@ else()
         install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/external/boost/boost
                 DESTINATION ${INCL_INSTALL_DIR}/gromacs/external/boost
                 COMPONENT development)
-    endif ()
+    endif()
 endif()
 
 if(GMX_USE_TNG)
@@ -837,7 +837,7 @@ if (GMX_BUILD_FOR_COVERAGE)
     # be triggered by using an API against its specification isn't usually
     # worth the effort.
     add_definitions(-DNDEBUG -DBOOST_DISABLE_ASSERTS -DGMX_DISABLE_ASSERTS)
-endif ()
+endif()
 
 if (BUILD_TESTING)
     # "tests" target builds all the separate test binaries.
@@ -858,7 +858,7 @@ if (NOT GMX_BUILD_MDRUN_ONLY)
     add_subdirectory(doxygen)
     add_subdirectory(share)
     add_subdirectory(scripts)
-endif ()
+endif()
 add_subdirectory(src)
 
 if (BUILD_TESTING)
index 9a7b6346e2e8df1f5ac625e3cfb5fcbde8063a39..d33a736546c0cecd1653e3ec667a2ef3393cb865 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2011, by the GROMACS development team, led by
+# Copyright (c) 2011,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -37,11 +37,11 @@ SET(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
 
 IF(NOT DEFINED CTEST_DROP_METHOD)
   SET(CTEST_DROP_METHOD "http")
-ENDIF(NOT DEFINED CTEST_DROP_METHOD)
+ENDIF()
 
 IF(CTEST_DROP_METHOD STREQUAL "http")
   SET(CTEST_DROP_SITE "cdash.gromacs.org")
   SET(CTEST_DROP_LOCATION "/submit.php?project=Gromacs")
   SET(CTEST_DROP_SITE_CDASH TRUE)
-ENDIF(CTEST_DROP_METHOD STREQUAL "http")
+ENDIF()
 
index 97a71290da568f83ab4ad519d343f1a9e61707c5..e7a98a7071159f3fa809b9a05e2b81dd4be6d755 100644 (file)
@@ -64,15 +64,15 @@ endfunction ()
 
 if (NOT DEFINED SRCDIR OR NOT DEFINED BUILDDIR OR NOT DEFINED OUTDIR)
     message(FATAL_ERROR "Required input variable (SRCDIR, BUILDDIR, OUTDIR) not set")
-endif ()
+endif()
 
 if (NOT DEFINED PYTHON_EXECUTABLE)
     set(PYTHON_EXECUTABLE python)
-endif ()
+endif()
 
 if (NOT DEFINED MODE)
     set(MODE "CHECK")
-endif ()
+endif()
 
 if (MODE STREQUAL "CHECK")
     set(GRAPHOPTIONS --check)
@@ -83,9 +83,9 @@ elseif (MODE STREQUAL "GRAPHS")
     set(GRAPHOPTIONS
         --module-graph module-deps.dot --module-file-graphs
         -o ${OUTDIR})
-else ()
+else()
     message(FATAL_ERROR "Unknown mode ${MODE}")
-endif ()
+endif()
 
 file(MAKE_DIRECTORY ${OUTDIR})
 generate_module_file_list(${SRCDIR} ${OUTDIR}/module-files.txt ${MODE})
@@ -101,4 +101,4 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SRCDIR}/admin/includedeps.py
 if (MODE STREQUAL "GRAPHS" AND DOT_EXECUTABLE)
     file(GLOB DOT_INPUT_FILES ${OUTDIR}/*.dot)
     execute_process(COMMAND ${DOT_EXECUTABLE} -Tpng -O ${DOT_INPUT_FILES})
-endif ()
+endif()
diff --git a/cmake/FindBLAS.cmake b/cmake/FindBLAS.cmake
deleted file mode 100644 (file)
index bb79ca2..0000000
+++ /dev/null
@@ -1,610 +0,0 @@
-# - Find BLAS library
-# This module finds an installed fortran library that implements the BLAS
-# linear-algebra interface (see http://www.netlib.org/blas/).
-# The list of libraries searched for is taken
-# from the autoconf macro file, acx_blas.m4 (distributed at
-# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).
-#
-# This module sets the following variables:
-#  BLAS_FOUND - set to true if a library implementing the BLAS interface
-#    is found
-#  BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l
-#    and -L).
-#  BLAS_LIBRARIES - uncached list of libraries (using full path name) to
-#    link against to use BLAS
-#  BLAS95_LIBRARIES - uncached list of libraries (using full path name)
-#    to link against to use BLAS95 interface
-#  BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
-#    is found
-#  BLA_STATIC  if set on this determines what kind of linkage we do (static)
-#  BLA_VENDOR  if set checks only the specified vendor, if not set checks
-#     all the possibilities
-#  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
-##########
-### List of vendors (BLA_VENDOR) valid in this module
-##  Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
-##  Intel10_64lp_seq (intel mkl v10 64 bit,sequential code, lp64 model),
-##  Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic
-# C/CXX should be enabled to use Intel mkl
-
-#=============================================================================
-# Copyright 2007-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-include(CheckFunctionExists)
-include(CheckFortranFunctionExists)
-include(CheckTypeSize)
-
-set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-
-# Check the language being used
-get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )
-if( _LANGUAGES_ MATCHES Fortran )
-  set( _CHECK_FORTRAN TRUE )
-elseif( (_LANGUAGES_ MATCHES C) OR (_LANGUAGES_ MATCHES CXX) )
-  set( _CHECK_FORTRAN FALSE )
-else()
-  if(BLAS_FIND_REQUIRED)
-    message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
-  else(BLAS_FIND_REQUIRED)
-    message(STATUS "Looking for BLAS... - NOT found (Unsupported languages)")
-    return()
-  endif(BLAS_FIND_REQUIRED)
-endif( )
-
-macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
-# This macro checks for the existence of the combination of fortran libraries
-# given by _list.  If the combination is found, this macro checks (using the
-# Check_Fortran_Function_Exists macro) whether can link against that library
-# combination using the name of a routine given by _name using the linker
-# flags given by _flags.  If the combination of libraries is found and passes
-# the link test, LIBRARIES is set to the list of complete library paths that
-# have been found.  Otherwise, LIBRARIES is set to FALSE.
-
-# N.B. _prefix is the prefix applied to the names of all cached variables that
-# are generated internally and marked advanced by this macro.
-
-set(_libdir ${ARGN})
-
-set(_libraries_work TRUE)
-set(${LIBRARIES})
-set(_combined_name)
-if (NOT _libdir)
-  if (WIN32)
-    set(_libdir ENV LIB)
-  elseif (APPLE)
-    set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
-  else ()
-    set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
-  endif ()
-endif ()
-
-foreach(_library ${_list})
-  set(_combined_name ${_combined_name}_${_library})
-
-  if(_libraries_work)
-    if (BLA_STATIC)
-      if (WIN32)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      endif ( WIN32 )
-      if (APPLE)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      else (APPLE)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      endif (APPLE)
-    else (BLA_STATIC)
-      if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-        # for ubuntu's libblas3gf and liblapack3gf packages
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
-      endif ()
-    endif (BLA_STATIC)
-    find_library(${_prefix}_${_library}_LIBRARY
-      NAMES ${_library}
-      PATHS ${_libdir}
-      )
-    mark_as_advanced(${_prefix}_${_library}_LIBRARY)
-    set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
-    set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
-  endif(_libraries_work)
-endforeach(_library ${_list})
-if(_libraries_work)
-  # Test this combination of libraries.
-  set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread})
-#  message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
-  if (_CHECK_FORTRAN)
-    check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
-  else()
-    check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
-  endif()
-  set(CMAKE_REQUIRED_LIBRARIES)
-  mark_as_advanced(${_prefix}${_combined_name}_WORKS)
-  set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
-endif(_libraries_work)
-if(NOT _libraries_work)
-  set(${LIBRARIES} FALSE)
-endif(NOT _libraries_work)
-#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
-endmacro(Check_Fortran_Libraries)
-
-set(BLAS_LINKER_FLAGS)
-set(BLAS_LIBRARIES)
-set(BLAS95_LIBRARIES)
-if ($ENV{BLA_VENDOR} MATCHES ".+")
-  set(BLA_VENDOR $ENV{BLA_VENDOR})
-else ($ENV{BLA_VENDOR} MATCHES ".+")
-  if(NOT BLA_VENDOR)
-    set(BLA_VENDOR "All")
-  endif(NOT BLA_VENDOR)
-endif ($ENV{BLA_VENDOR} MATCHES ".+")
-
-if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  # gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "goto2"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
-
-if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  dgemm
-  ""
-  "f77blas;atlas"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
-if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "sgemm;dgemm;blas"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in Alpha CXML library?
-if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "cxml"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in Alpha DXML library? (now called CXML, see above)
-if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "dxml"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in Sun Performance library?
-if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  "-xlic_lib=sunperf"
-  "sunperf;sunmath"
-  ""
-  )
-  if(BLAS_LIBRARIES)
-    set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf")
-  endif(BLAS_LIBRARIES)
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in SCSL library?  (SGI/Cray Scientific Library)
-if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "scsl"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in SGIMATH library?
-if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "complib.sgimath"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
-if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "essl;blas"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
-
-#BLAS in acml library?
-if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
- if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
-     ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR
-     ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS))
-   )
-   # try to find acml in "standard" paths
-   if( WIN32 )
-    file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" )
-   else()
-    file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" )
-   endif()
-   if( WIN32 )
-    file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" )
-   else()
-    file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" )
-   endif()
-   list(GET _ACML_ROOT 0 _ACML_ROOT)
-   list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)
-   if( _ACML_ROOT )
-    get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
-    check_type_size("int" SIZEOF_INTEGER)
-    if( SIZEOF_INTEGER EQUAL 8 )
-     set( _ACML_PATH_SUFFIX "_int64" )
-    else()
-    set( _ACML_PATH_SUFFIX "" )
-   endif()
-   if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" )
-    set( _ACML_COMPILER32 "ifort32" )
-    set( _ACML_COMPILER64 "ifort64" )
-   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" )
-    set( _ACML_COMPILER32 "sun32" )
-    set( _ACML_COMPILER64 "sun64" )
-   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" )
-    set( _ACML_COMPILER32 "pgi32" )
-    if( WIN32 )
-     set( _ACML_COMPILER64 "win64" )
-    else()
-     set( _ACML_COMPILER64 "pgi64" )
-    endif()
-   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" )
-    # 32 bit builds not supported on Open64 but for code simplicity
-    # We'll just use the same directory twice
-    set( _ACML_COMPILER32 "open64_64" )
-    set( _ACML_COMPILER64 "open64_64" )
-   elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
-    set( _ACML_COMPILER32 "nag32" )
-    set( _ACML_COMPILER64 "nag64" )
-   else() #if( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
-    set( _ACML_COMPILER32 "gfortran32" )
-    set( _ACML_COMPILER64 "gfortran64" )
-   endif()
-
-   if( BLA_VENDOR STREQUAL "ACML_MP" )
-    set(_ACML_MP_LIB_DIRS
-     "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib"
-     "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" )
-   else() #if( _BLAS_VENDOR STREQUAL "ACML" )
-    set(_ACML_LIB_DIRS
-     "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib"
-     "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" )
-   endif()
-  endif()
- elseif(BLAS_${BLA_VENDOR}_LIB_DIRS)
-   set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS})
- endif()
-
- if( BLA_VENDOR STREQUAL "ACML_MP" )
-  foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS})
-   check_fortran_libraries (
-     BLAS_LIBRARIES
-     BLAS
-     sgemm
-     "" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS}
-   )
-   if( BLAS_LIBRARIES )
-    break()
-   endif()
-  endforeach()
- elseif( BLA_VENDOR STREQUAL "ACML_GPU" )
-  foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS})
-   check_fortran_libraries (
-     BLAS_LIBRARIES
-     BLAS
-     sgemm
-     "" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS}
-   )
-   if( BLAS_LIBRARIES )
-    break()
-   endif()
-  endforeach()
- else() #if( _BLAS_VENDOR STREQUAL "ACML" )
-  foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} )
-   check_fortran_libraries (
-     BLAS_LIBRARIES
-     BLAS
-     sgemm
-     "" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS}
-   )
-   if( BLAS_LIBRARIES )
-    break()
-   endif()
-  endforeach()
- endif()
-
- # Either acml or acml_mp should be in LD_LIBRARY_PATH but not both
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "acml;acml_mv"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "acml_mp;acml_mv"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "acml;acml_mv;CALBLAS"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif () # ACML
-
-# Apple BLAS library?
-if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
-if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  dgemm
-  ""
-  "Accelerate"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
-
-if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
- if ( NOT BLAS_LIBRARIES )
-    check_fortran_libraries(
-    BLAS_LIBRARIES
-    BLAS
-    dgemm
-    ""
-    "vecLib"
-    ""
-    )
- endif ( NOT BLAS_LIBRARIES )
-endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
-# Generic BLAS library?
-if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
-  check_fortran_libraries(
-  BLAS_LIBRARIES
-  BLAS
-  sgemm
-  ""
-  "blas"
-  ""
-  )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
-
-#BLAS in intel mkl 10 library? (em64t 64bit)
-if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
- if (NOT WIN32)
-  set(LM "-lm")
- endif ()
- if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-  if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
-    find_package(Threads)
-  else(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
-    find_package(Threads REQUIRED)
-  endif(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
-
-  set(BLAS_SEARCH_LIBS "")
-
-  if(BLA_F95)
-    set(BLAS_mkl_SEARCH_SYMBOL SGEMM)
-    set(_LIBRARIES BLAS95_LIBRARIES)
-    if (WIN32)
-      list(APPEND BLAS_SEARCH_LIBS
-        "mkl_blas95 mkl_intel_c mkl_intel_thread mkl_core libguide40")
-    else (WIN32)
-      if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide")
-      endif ()
-      if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
-        # old version
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide")
-
-        # mkl >= 10.3
-        if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
-          list(APPEND BLAS_SEARCH_LIBS
-            "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core")
-          set(LM "${LM};-lgomp")
-        else ()
-          list(APPEND BLAS_SEARCH_LIBS
-            "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
-        endif ()
-      endif ()
-    endif (WIN32)
-    if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
-      list(APPEND BLAS_SEARCH_LIBS
-        "mkl_blas95_lp64 mkl_intel_lp64 mkl_sequential mkl_core")
-    endif ()
-  else (BLA_F95)
-    set(BLAS_mkl_SEARCH_SYMBOL sgemm)
-    set(_LIBRARIES BLAS_LIBRARIES)
-    if (WIN32)
-      list(APPEND BLAS_SEARCH_LIBS
-        "mkl_c_dll mkl_intel_thread_dll mkl_core_dll libguide40")
-    else (WIN32)
-      if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl_intel mkl_intel_thread mkl_core guide")
-      endif ()
-      if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
-
-        # old version
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl_intel_lp64 mkl_intel_thread mkl_core guide")
-
-        # mkl >= 10.3
-        if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
-          list(APPEND BLAS_SEARCH_LIBS
-            "mkl_intel_lp64 mkl_gnu_thread mkl_core")
-          set(LM "${LM};-lgomp")
-        else ()
-          list(APPEND BLAS_SEARCH_LIBS
-            "mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
-        endif ()
-      endif ()
-
-      #older vesions of intel mkl libs
-      if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All")
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl")
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl_ia32")
-        list(APPEND BLAS_SEARCH_LIBS
-          "mkl_em64t")
-      endif ()
-    endif (WIN32)
-    if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
-      list(APPEND BLAS_SEARCH_LIBS
-        "mkl_intel_lp64 mkl_sequential mkl_core")
-    endif ()
-  endif (BLA_F95)
-
-  foreach (IT ${BLAS_SEARCH_LIBS})
-    string(REPLACE " " ";" SEARCH_LIBS ${IT})
-    if (${_LIBRARIES})
-    else ()
-      check_fortran_libraries(
-        ${_LIBRARIES}
-        BLAS
-        ${BLAS_mkl_SEARCH_SYMBOL}
-        ""
-        "${SEARCH_LIBS}"
-        "${CMAKE_THREAD_LIBS_INIT};${LM}"
-        )
-    endif ()
-  endforeach ()
-
- endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
-
-
-if(BLA_F95)
- if(BLAS95_LIBRARIES)
-    set(BLAS95_FOUND TRUE)
-  else(BLAS95_LIBRARIES)
-    set(BLAS95_FOUND FALSE)
-  endif(BLAS95_LIBRARIES)
-
-  if(NOT BLAS_FIND_QUIETLY)
-    if(BLAS95_FOUND)
-      message(STATUS "A library with BLAS95 API found.")
-    else(BLAS95_FOUND)
-      if(BLAS_FIND_REQUIRED)
-        message(FATAL_ERROR
-        "A required library with BLAS95 API not found. Please specify library location.")
-      else(BLAS_FIND_REQUIRED)
-        message(STATUS
-        "A library with BLAS95 API not found. Please specify library location.")
-      endif(BLAS_FIND_REQUIRED)
-    endif(BLAS95_FOUND)
-  endif(NOT BLAS_FIND_QUIETLY)
-  set(BLAS_FOUND TRUE)
-  set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
-else(BLA_F95)
-  if(BLAS_LIBRARIES)
-    set(BLAS_FOUND TRUE)
-  else(BLAS_LIBRARIES)
-    set(BLAS_FOUND FALSE)
-  endif(BLAS_LIBRARIES)
-
-  if(NOT BLAS_FIND_QUIETLY)
-    if(BLAS_FOUND)
-      message(STATUS "A library with BLAS API found.")
-    else(BLAS_FOUND)
-      if(BLAS_FIND_REQUIRED)
-        message(FATAL_ERROR
-        "A required library with BLAS API not found. Please specify library location."
-        )
-      else(BLAS_FIND_REQUIRED)
-        message(STATUS
-        "A library with BLAS API not found. Please specify library location."
-        )
-      endif(BLAS_FIND_REQUIRED)
-    endif(BLAS_FOUND)
-  endif(NOT BLAS_FIND_QUIETLY)
-endif(BLA_F95)
-
-set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
index e44ffe5640528630aaa12d5884bb6c2b66d52c6e..e7af8a22c5a3672da63041448e5a0592a87a6ed9 100644 (file)
@@ -66,7 +66,7 @@ if(NOT __pkg_config_checked_PC_${FFTW} OR NOT ${FFTW}_LIBRARY)
   if(NOT PC_${FFTW}_FOUND)
     message(STATUS "pkg-config could not detect ${${FFTW}_PKG}, trying generic detection")
   endif()
-endif(NOT __pkg_config_checked_PC_${FFTW} OR NOT ${FFTW}_LIBRARY)
+endif()
 
 find_path(${FFTW}_INCLUDE_DIR "fftw3.h" HINTS ${PC_${FFTW}_INCLUDE_DIRS})
 find_library(${FFTW}_LIBRARY NAMES "${${FFTW}_PKG}" HINTS ${PC_${FFTW}_LIBRARY_DIRS})
@@ -90,7 +90,7 @@ if (${FFTW}_FOUND)
   if (HAVE_LIBM)
     #adding MATH_LIBRARIES here to allow static libs, this does not harm us as we are anyway using it
     set(CMAKE_REQUIRED_LIBRARIES m)
-  endif (HAVE_LIBM)
+  endif ()
   gmx_check_if_changed(FFTW_LIBRARY_CHANGED ${FFTW}_LIBRARIES)
   if (FFTW_LIBRARY_CHANGED)
     unset(FOUND_${FFTW}_PLAN CACHE)
@@ -98,7 +98,7 @@ if (${FFTW}_FOUND)
   check_library_exists("${${FFTW}_LIBRARIES}" "${${FFTW}_FUNCTION_PREFIX}_plan_r2r_1d" "" FOUND_${FFTW}_PLAN)
   if(NOT FOUND_${FFTW}_PLAN)
     message(FATAL_ERROR "Could not find ${${FFTW}_FUNCTION_PREFIX}_plan_r2r_1d in ${${FFTW}_LIBRARY}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what went wrong. If you are using a static lib (.a) make sure you have specified all dependencies of ${${FFTW}_PKG} in ${FFTW}_LIBRARY by hand (e.g. -D${FFTW}_LIBRARY='/path/to/lib${${FFTW}_PKG}.so;/path/to/libm.so') !")
-  endif(NOT FOUND_${FFTW}_PLAN)
+  endif()
 
   # Check for FFTW3 compiled with --enable-avx, which is slower for GROMACS than --enable-sse or --enable-sse2
   foreach(AVX_FUNCTION ${${FFTW}_FUNCTION_PREFIX}_have_simd_avx)
@@ -109,7 +109,7 @@ if (${FFTW}_FOUND)
     if(${FFTW}_HAVE_${AVX_FUNCTION})
       set(${FFTW}_HAVE_AVX TRUE)
       break()
-    endif(${FFTW}_HAVE_${AVX_FUNCTION})
+    endif()
   endforeach()
 
   #in 3.3 sse function name has changed
@@ -121,7 +121,7 @@ if (${FFTW}_FOUND)
     if(${FFTW}_HAVE_${SIMD_FCT})
       set(${FFTW}_HAVE_SIMD TRUE)
       break()
-    endif(${FFTW}_HAVE_${SIMD_FCT})
+    endif()
   endforeach()
   #Verify FFTW is compiled with fPIC (necessary for shared libraries)
   if (CMAKE_OBJDUMP AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND BUILD_SHARED_LIBS)
@@ -129,9 +129,9 @@ if (${FFTW}_FOUND)
       if (${${FFTW}_OBJDUMP} MATCHES "R_X86_64" #Should always be true for static libraries. Checks that objdump works properly and that the library isn't dynamic
               AND NOT ${${FFTW}_OBJDUMP} MATCHES "R_X86_64_PLT32")
           message(FATAL_ERROR "The FFTW library ${${FFTW}_LIBRARY} cannot be used with shared libraries. Provide a different FFTW library by setting ${FFTW}_LIBRARY. If you don't have a different one, recompile FFTW with \"--enable-shared\" or \"--with-pic\". Or disable shared libraries for Gromacs by setting BUILD_SHARED_LIBS to \"no\". Note: Disabling shared libraries requires up to 10x as much disk space.")
-      endif ()
-  endif ()
+      endif()
+  endif()
   set(CMAKE_REQUIRED_LIBRARIES)
-endif (${FFTW}_FOUND)
+endif ()
 
 mark_as_advanced(${FFTW}_INCLUDE_DIR ${FFTW}_LIBRARY)
diff --git a/cmake/FindLAPACK.cmake b/cmake/FindLAPACK.cmake
deleted file mode 100644 (file)
index 0ae98df..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-# - Find LAPACK library
-# This module finds an installed fortran library that implements the LAPACK
-# linear-algebra interface (see http://www.netlib.org/lapack/).
-#
-# The approach follows that taken for the autoconf macro file, acx_lapack.m4
-# (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html).
-#
-# This module sets the following variables:
-#  LAPACK_FOUND - set to true if a library implementing the LAPACK interface
-#    is found
-#  LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l
-#    and -L).
-#  LAPACK_LIBRARIES - uncached list of libraries (using full path name) to
-#    link against to use LAPACK
-#  LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to
-#    link against to use LAPACK95
-#  LAPACK95_FOUND - set to true if a library implementing the LAPACK f95
-#    interface is found
-#  BLA_STATIC  if set on this determines what kind of linkage we do (static)
-#  BLA_VENDOR  if set checks only the specified vendor, if not set checks
-#     all the possibilities
-#  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
-### List of vendors (BLA_VENDOR) valid in this module
-##  Intel(mkl), ACML,Apple, NAS, Generic
-
-#=============================================================================
-# Copyright 2007-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-
-get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
-if (NOT _LANGUAGES_ MATCHES Fortran)
-include(CheckFunctionExists)
-else (NOT _LANGUAGES_ MATCHES Fortran)
-include(CheckFortranFunctionExists)
-endif (NOT _LANGUAGES_ MATCHES Fortran)
-
-set(LAPACK_FOUND FALSE)
-set(LAPACK95_FOUND FALSE)
-
-# TODO: move this stuff to separate module
-
-macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads)
-# This macro checks for the existence of the combination of fortran libraries
-# given by _list.  If the combination is found, this macro checks (using the
-# Check_Fortran_Function_Exists macro) whether can link against that library
-# combination using the name of a routine given by _name using the linker
-# flags given by _flags.  If the combination of libraries is found and passes
-# the link test, LIBRARIES is set to the list of complete library paths that
-# have been found.  Otherwise, LIBRARIES is set to FALSE.
-
-# N.B. _prefix is the prefix applied to the names of all cached variables that
-# are generated internally and marked advanced by this macro.
-
-set(_libraries_work TRUE)
-set(${LIBRARIES})
-set(_combined_name)
-if (NOT _libdir)
-  if (WIN32)
-    set(_libdir ENV LIB)
-  elseif (APPLE)
-    set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
-  else ()
-    set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
-  endif ()
-endif ()
-foreach(_library ${_list})
-  set(_combined_name ${_combined_name}_${_library})
-
-  if(_libraries_work)
-    if (BLA_STATIC)
-      if (WIN32)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      endif ( WIN32 )
-      if (APPLE)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      else (APPLE)
-        set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      endif (APPLE)
-    else (BLA_STATIC)
-                       if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-        # for ubuntu's libblas3gf and liblapack3gf packages
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
-      endif ()
-    endif (BLA_STATIC)
-    find_library(${_prefix}_${_library}_LIBRARY
-      NAMES ${_library}
-      PATHS ${_libdir}
-      )
-    mark_as_advanced(${_prefix}_${_library}_LIBRARY)
-    set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
-    set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
-  endif(_libraries_work)
-endforeach(_library ${_list})
-
-if(_libraries_work)
-  # Test this combination of libraries.
-  if(UNIX AND BLA_STATIC)
-    set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}} ${_blas} "-Wl,--end-group" ${_threads})
-  else(UNIX AND BLA_STATIC)
-    set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
-  endif(UNIX AND BLA_STATIC)
-#  message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
-  if (NOT _LANGUAGES_ MATCHES Fortran)
-    check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
-  else (NOT _LANGUAGES_ MATCHES Fortran)
-    check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
-  endif (NOT _LANGUAGES_ MATCHES Fortran)
-  set(CMAKE_REQUIRED_LIBRARIES)
-  mark_as_advanced(${_prefix}${_combined_name}_WORKS)
-  set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
-  #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
-endif(_libraries_work)
-
- if(_libraries_work)
-   set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threads})
- else(_libraries_work)
-    set(${LIBRARIES} FALSE)
- endif(_libraries_work)
-
-endmacro(Check_Lapack_Libraries)
-
-
-set(LAPACK_LINKER_FLAGS)
-set(LAPACK_LIBRARIES)
-set(LAPACK95_LIBRARIES)
-
-
-if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-  find_package(BLAS)
-else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-  find_package(BLAS REQUIRED)
-endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-
-
-if(BLAS_FOUND)
-  set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS})
-  if ($ENV{BLA_VENDOR} MATCHES ".+")
-    set(BLA_VENDOR $ENV{BLA_VENDOR})
-  else ($ENV{BLA_VENDOR} MATCHES ".+")
-    if(NOT BLA_VENDOR)
-      set(BLA_VENDOR "All")
-    endif(NOT BLA_VENDOR)
-  endif ($ENV{BLA_VENDOR} MATCHES ".+")
-
-if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
- if(NOT LAPACK_LIBRARIES)
-  check_lapack_libraries(
-  LAPACK_LIBRARIES
-  LAPACK
-  cheev
-  ""
-  "goto2"
-  "${BLAS_LIBRARIES}"
-  ""
-  )
- endif(NOT LAPACK_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
-
-
-#acml lapack
- if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
-   if (BLAS_LIBRARIES MATCHES ".+acml.+")
-     set (LAPACK_LIBRARIES ${BLAS_LIBRARIES})
-   endif ()
- endif ()
-
-# Apple LAPACK library?
-if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
- if(NOT LAPACK_LIBRARIES)
-  check_lapack_libraries(
-  LAPACK_LIBRARIES
-  LAPACK
-  cheev
-  ""
-  "Accelerate"
-  "${BLAS_LIBRARIES}"
-  ""
-  )
- endif(NOT LAPACK_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
-if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
-  if ( NOT LAPACK_LIBRARIES )
-    check_lapack_libraries(
-    LAPACK_LIBRARIES
-    LAPACK
-    cheev
-    ""
-    "vecLib"
-    "${BLAS_LIBRARIES}"
-    ""
-    )
-  endif ( NOT LAPACK_LIBRARIES )
-endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
-# Generic LAPACK library?
-if (BLA_VENDOR STREQUAL "Generic" OR
-    BLA_VENDOR STREQUAL "ATLAS" OR
-    BLA_VENDOR STREQUAL "All")
-  if ( NOT LAPACK_LIBRARIES )
-    check_lapack_libraries(
-    LAPACK_LIBRARIES
-    LAPACK
-    cheev
-    ""
-    "lapack"
-    "${BLAS_LIBRARIES}"
-    ""
-    )
-  endif ( NOT LAPACK_LIBRARIES )
-endif ()
-#intel lapack
-if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
-  if (NOT WIN32)
-    set(LM "-lm")
-  endif ()
-  if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-    if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-      find_PACKAGE(Threads)
-    else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-      find_package(Threads REQUIRED)
-    endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
-    if (BLA_F95)
-      if(NOT LAPACK95_LIBRARIES)
-        # old
-        check_lapack_libraries(
-          LAPACK95_LIBRARIES
-          LAPACK
-          cheev
-          ""
-          "mkl_lapack95"
-          "${BLAS95_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK95_LIBRARIES)
-      if(NOT LAPACK95_LIBRARIES)
-        # new >= 10.3
-        check_lapack_libraries(
-          LAPACK95_LIBRARIES
-          LAPACK
-          CHEEV
-          ""
-          "mkl_intel_lp64"
-          "${BLAS95_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK95_LIBRARIES)
-    else(BLA_F95)
-      if(NOT LAPACK_LIBRARIES)
-        # old
-        check_lapack_libraries(
-          LAPACK_LIBRARIES
-          LAPACK
-          cheev
-          ""
-          "mkl_lapack"
-          "${BLAS_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK_LIBRARIES)
-      if(NOT LAPACK_LIBRARIES)
-        # new >= 10.3
-        check_lapack_libraries(
-          LAPACK_LIBRARIES
-          LAPACK
-          cheev
-          ""
-          "mkl_gf_lp64"
-          "${BLAS_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK_LIBRARIES)
-    endif(BLA_F95)
-  endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
-else(BLAS_FOUND)
-  message(STATUS "LAPACK requires BLAS")
-endif(BLAS_FOUND)
-
-if(BLA_F95)
- if(LAPACK95_LIBRARIES)
-  set(LAPACK95_FOUND TRUE)
- else(LAPACK95_LIBRARIES)
-  set(LAPACK95_FOUND FALSE)
- endif(LAPACK95_LIBRARIES)
- if(NOT LAPACK_FIND_QUIETLY)
-  if(LAPACK95_FOUND)
-    message(STATUS "A library with LAPACK95 API found.")
-  else(LAPACK95_FOUND)
-    if(LAPACK_FIND_REQUIRED)
-      message(FATAL_ERROR
-      "A required library with LAPACK95 API not found. Please specify library location."
-      )
-    else(LAPACK_FIND_REQUIRED)
-      message(STATUS
-      "A library with LAPACK95 API not found. Please specify library location."
-      )
-    endif(LAPACK_FIND_REQUIRED)
-  endif(LAPACK95_FOUND)
- endif(NOT LAPACK_FIND_QUIETLY)
- set(LAPACK_FOUND "${LAPACK95_FOUND}")
- set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}")
-else(BLA_F95)
- if(LAPACK_LIBRARIES)
-  set(LAPACK_FOUND TRUE)
- else(LAPACK_LIBRARIES)
-  set(LAPACK_FOUND FALSE)
- endif(LAPACK_LIBRARIES)
-
- if(NOT LAPACK_FIND_QUIETLY)
-  if(LAPACK_FOUND)
-    message(STATUS "A library with LAPACK API found.")
-  else(LAPACK_FOUND)
-    if(LAPACK_FIND_REQUIRED)
-      message(FATAL_ERROR
-      "A required library with LAPACK API not found. Please specify library location."
-      )
-    else(LAPACK_FIND_REQUIRED)
-      message(STATUS
-      "A library with LAPACK API not found. Please specify library location."
-      )
-    endif(LAPACK_FIND_REQUIRED)
-  endif(LAPACK_FOUND)
- endif(NOT LAPACK_FIND_QUIETLY)
-endif(BLA_F95)
-
-set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
index 94a4b013735b05f392501a83a6d774a04276a05f..5edacb98f127451687fa46cbd3d5d47237932630 100644 (file)
@@ -1,18 +1,72 @@
-
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+# and including many others, as listed in the AUTHORS file in the
+# top-level source directory and at http://www.gromacs.org.
+#
+# GROMACS is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# GROMACS is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with GROMACS; if not, see
+# http://www.gnu.org/licenses, or write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+#
+# If you want to redistribute modifications to GROMACS, please
+# consider that scientific software is very special. Version
+# control is crucial - bugs must be traceable. We will be happy to
+# consider code for inclusion in the official distribution, but
+# derived work must not be called official GROMACS. Details are found
+# in the README & COPYING files - if they are missing, get the
+# official version at http://www.gromacs.org.
+#
+# To help us fund GROMACS development, we humbly ask that you cite
+# the research papers on the package. Check out http://www.gromacs.org.
+#
 #=============================================================================
-# Copyright 2010 Kitware, Inc.
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
 # Copyright 2010 Todd Gamblin <tgamblin@llnl.gov>
 # Copyright 2012 Julien Bigot <julien.bigot@cea.fr>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
 
 #
 # BlueGeneQ base platform file.
index f602d6d70d7a75040150477f6135d97f6736ec94..a814ac765f2beee6a80861cbeca4819810af0a44 100644 (file)
@@ -1,18 +1,73 @@
-
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+# and including many others, as listed in the AUTHORS file in the
+# top-level source directory and at http://www.gromacs.org.
+#
+# GROMACS is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# GROMACS is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with GROMACS; if not, see
+# http://www.gnu.org/licenses, or write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+#
+# If you want to redistribute modifications to GROMACS, please
+# consider that scientific software is very special. Version
+# control is crucial - bugs must be traceable. We will be happy to
+# consider code for inclusion in the official distribution, but
+# derived work must not be called official GROMACS. Details are found
+# in the README & COPYING files - if they are missing, get the
+# official version at http://www.gromacs.org.
+#
+# To help us fund GROMACS development, we humbly ask that you cite
+# the research papers on the package. Check out http://www.gromacs.org.
+#
 #=============================================================================
-# Copyright 2010 Kitware, Inc.
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
 # Copyright 2010 Todd Gamblin <tgamblin@llnl.gov>
 # Copyright 2012 Julien Bigot <julien.bigot@cea.fr>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
 
 include(BlueGeneQ-static)
 __BlueGeneQ_set_static_flags(XL C)
index f602d6d70d7a75040150477f6135d97f6736ec94..a814ac765f2beee6a80861cbeca4819810af0a44 100644 (file)
@@ -1,18 +1,73 @@
-
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+# and including many others, as listed in the AUTHORS file in the
+# top-level source directory and at http://www.gromacs.org.
+#
+# GROMACS is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1
+# of the License, or (at your option) any later version.
+#
+# GROMACS is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with GROMACS; if not, see
+# http://www.gnu.org/licenses, or write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+#
+# If you want to redistribute modifications to GROMACS, please
+# consider that scientific software is very special. Version
+# control is crucial - bugs must be traceable. We will be happy to
+# consider code for inclusion in the official distribution, but
+# derived work must not be called official GROMACS. Details are found
+# in the README & COPYING files - if they are missing, get the
+# official version at http://www.gromacs.org.
+#
+# To help us fund GROMACS development, we humbly ask that you cite
+# the research papers on the package. Check out http://www.gromacs.org.
+#
 #=============================================================================
-# Copyright 2010 Kitware, Inc.
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
 # Copyright 2010 Todd Gamblin <tgamblin@llnl.gov>
 # Copyright 2012 Julien Bigot <julien.bigot@cea.fr>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
 
 include(BlueGeneQ-static)
 __BlueGeneQ_set_static_flags(XL C)
index f5bd5b4dd7077be8b967b5c05679538c3bff5000..de1c3a4605099a10dceab5adc9b797603926d175 100644 (file)
@@ -1,18 +1,39 @@
-
 #=============================================================================
-# Copyright 2010 Kitware, Inc.
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
 # Copyright 2010 Todd Gamblin <tgamblin@llnl.gov>
 # Copyright 2012 Julien Bigot <julien.bigot@cea.fr>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
 
 include(BlueGeneQ-base)
 set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
index 244c5ac87138c7f7b745b1c3071ebf891eb2ca8f..7eabdd450f62a7f4dbbc940f3766c9bf354f0bfa 100644 (file)
@@ -41,6 +41,7 @@ include(CheckCSourceCompiles)
 # Options:
 # include directory for thread_mpi/atomic.h
 MACRO(TMPI_TEST_ATOMICS INCDIR)
+
     if (NOT DEFINED TMPI_ATOMICS)
         try_compile(TEST_ATOMICS "${CMAKE_BINARY_DIR}"
                 "${CMAKE_SOURCE_DIR}/cmake/TestAtomics.c"
@@ -53,11 +54,12 @@ MACRO(TMPI_TEST_ATOMICS INCDIR)
             # positive results.
             set(TMPI_ATOMICS ${TEST_ATOMICS} CACHE INTERNAL "Whether atomic operations are found")
             set(TMPI_ATOMICS_INCDIR ${INCDIR} CACHE INTERNAL "Atomic operations check include dir")
-        else (TEST_ATOMICS)
+        else ()
             message(STATUS "Atomic operations not found")
             unset(TEST_ATOMICS)
-        endif(TEST_ATOMICS)
-    endif(NOT DEFINED TMPI_ATOMICS)
+        endif()
+    endif()
+
 ENDMACRO(TMPI_TEST_ATOMICS VARIABLE)
 
 
@@ -69,9 +71,9 @@ if (CMAKE_USE_PTHREADS_INIT)
 elseif (CMAKE_USE_WIN32_THREADS_INIT)
     set(THREAD_WINDOWS 1)
     set(THREAD_LIB)
-else ()
+else()
     message(FATAL_ERROR "Thread support required")
-endif (CMAKE_USE_PTHREADS_INIT)
+endif ()
 
 # Turns on thread_mpi core threading functions.
 MACRO(TMPI_ENABLE_CORE INCDIR)
@@ -98,9 +100,9 @@ MACRO(TMPI_ENABLE_CORE INCDIR)
         )
         if (PTHREAD_SETAFFINITY)
             set(HAVE_PTHREAD_SETAFFINITY 1)
-        endif (PTHREAD_SETAFFINITY)
+        endif ()
         set(CMAKE_REQUIRED_LIBRARIES)
-    endif (THREAD_PTHREADS)
+    endif ()
 
 
 # this runs on POSIX systems
@@ -131,36 +133,36 @@ MACRO(TMPI_ENABLE)
     mark_as_advanced(THREAD_MPI_WAIT_FOR_NO_ONE)
     if (THREAD_MPI_WAIT_FOR_NO_ONE)
         set(TMPI_WAIT_FOR_NO_ONE 1)
-    else (THREAD_MPI_WAIT_FOR_NO_ONE)
+    else ()
         set(TMPI_WAIT_FOR_NO_ONE 0)
-    endif (THREAD_MPI_WAIT_FOR_NO_ONE)
+    endif ()
 
 # the copy buffer option
     option(THREAD_MPI_COPY_BUFFER "Use an intermediate copy buffer for small message sizes, to allow blocking sends to return quickly. Only useful in programs with relatively uncoupled threads (infrequent MPI communication)" OFF)
     mark_as_advanced(THREAD_MPI_COPY_BUFFER)
     if (THREAD_MPI_COPY_BUFFER)
         set(TMPI_COPY_BUFFER 1)
-    else (THREAD_MPI_COPY_BUFFER)
+    else ()
         set(TMPI_COPY_BUFFER 0)
-    endif (THREAD_MPI_COPY_BUFFER)
+    endif ()
 
 # the profiling option
     option(THREAD_MPI_PROFILING "Turn on simple MPI profiling." OFF)
     mark_as_advanced(THREAD_MPI_PROFILING)
     if (THREAD_MPI_PROFILING)
         set(TMPI_PROFILE 1)
-    else (THREAD_MPI_PROFILING)
+    else ()
         set(TMPI_PROFILE 0)
-    endif (THREAD_MPI_PROFILING)
+    endif ()
 
 # tmpi warnings for testing
     option(THREAD_MPI_WARNINGS "Turn thread_mpi warnings for testing." OFF)
     mark_as_advanced(THREAD_MPI_WARNINGS)
     if (THREAD_MPI_WARNINGS)
         set(TMPI_WARNINGS 1)
-    else (THREAD_MPI_WARNINGS)
+    else ()
         set(TMPI_WARNINGS 0)
-    endif (THREAD_MPI_WARNINGS)
+    endif ()
 
     include(CheckCSourceCompiles)
 ENDMACRO(TMPI_ENABLE)
@@ -172,14 +174,17 @@ MACRO(TMPI_GET_SOURCE_LIST SRC_VARIABLE)
         thread_mpi/tmpi_malloc.c
         thread_mpi/atomic.c
         thread_mpi/lock.c)
+
     if (THREAD_PTHREADS)
         list(APPEND ${SRC_VARIABLE} thread_mpi/pthreads.c)
     elseif (THREAD_WINDOWS)
         list(APPEND ${SRC_VARIABLE} thread_mpi/winthreads.c)
-    endif (THREAD_PTHREADS)
+    endif ()
+
     if (TMPI_CXX_LIB)
         list(APPEND ${SRC_VARIABLE} thread_mpi/system_error.cpp)
-    endif (TMPI_CXX_LIB)
+    endif ()
+
     if (TMPI_ENABLED)
         list(APPEND ${SRC_VARIABLE}
              thread_mpi/alltoall.c      thread_mpi/p2p_protocol.c
index 1f373d64379baab6f410602f9b338de0ffe88b1d..955811745d650b366ee4babcc94624734f61045d 100644 (file)
 MACRO(GMX_TEST_CFLAG VARIABLE FLAGS CFLAGSVAR)
     IF(NOT DEFINED ${VARIABLE})
         CHECK_C_COMPILER_FLAG("${FLAGS}" ${VARIABLE})
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
     IF (${VARIABLE})
         SET (${CFLAGSVAR} "${FLAGS} ${${CFLAGSVAR}}")
-    ENDIF (${VARIABLE})
+    ENDIF ()
 ENDMACRO(GMX_TEST_CFLAG VARIABLE FLAGS CFLAGSVAR)
 
 # Test C++ flags FLAGS, and set VARIABLE to true if the work. Also add the
@@ -48,10 +48,10 @@ ENDMACRO(GMX_TEST_CFLAG VARIABLE FLAGS CFLAGSVAR)
 MACRO(GMX_TEST_CXXFLAG VARIABLE FLAGS CXXFLAGSVAR)
     IF(NOT DEFINED ${VARIABLE})
         CHECK_CXX_COMPILER_FLAG("${FLAGS}" ${VARIABLE})
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
     IF (${VARIABLE})
         SET (${CXXFLAGSVAR} "${FLAGS} ${${CXXFLAGSVAR}}")
-    ENDIF (${VARIABLE})
+    ENDIF ()
 ENDMACRO(GMX_TEST_CXXFLAG VARIABLE FLAGS CXXFLAGSVAR)
 
 # Set the real CMake variables for compiler flags. This should be a function
index 550a9ac16165a1f944b9e1e66630a4672bd1a6d4..447ce66782b10e70f193007b61b2d253f61d6e57 100644 (file)
@@ -55,9 +55,9 @@ function(gmx_suggest_x86_simd _suggested_simd)
 
     if(GMX_X86_GCC_INLINE_ASM)
         set(GCC_INLINE_ASM_DEFINE "-DGMX_X86_GCC_INLINE_ASM")
-    else(GMX_X86_GCC_INLINE_ASM)
+    else()
         set(GCC_INLINE_ASM_DEFINE "")
-    endif(GMX_X86_GCC_INLINE_ASM)
+    endif()
 
     message(STATUS "Detecting best SIMD instructions for this CPU")
 
index 6a569b22b7eb842cdf3bda60624faaeaab8d80ac..e5db8d1cef831bd35eb060586f51ba38bff7b106 100644 (file)
@@ -54,14 +54,15 @@ FUNCTION(GMX_FIND_CFLAG_FOR_SOURCE VARIABLE DESCRIPTION SOURCE CFLAGSVAR)
                 set(${VARIABLE}_FLAG "${_testflag}" CACHE INTERNAL "${DESCRIPTION}")
                 set(${VARIABLE} 1 CACHE INTERNAL "Result of test for ${DESCRIPTION}" FORCE)
                 break()
-            else(${${COMPILE_VARIABLE}})
+            else()
                 set(${VARIABLE} 0 CACHE INTERNAL "Result of test for ${DESCRIPTION}" FORCE)
-            endif(${${COMPILE_VARIABLE}})
+            endif()
         endforeach()
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
+
     IF (${VARIABLE})
         SET (${CFLAGSVAR} "${${CFLAGSVAR}} ${${VARIABLE}_FLAG}" PARENT_SCOPE)
-    ENDIF (${VARIABLE})
+    ENDIF ()
 ENDFUNCTION(GMX_FIND_CFLAG_FOR_SOURCE VARIABLE DESCRIPTION SOURCE CFLAGSVAR)
 
 
@@ -73,6 +74,7 @@ ENDFUNCTION(GMX_FIND_CFLAG_FOR_SOURCE VARIABLE DESCRIPTION SOURCE CFLAGSVAR)
 # FLAGSVAR            Variable (string) to which we should add the correct flag
 # Args 5 through N    Multiple strings with optimization flags to test
 FUNCTION(GMX_FIND_CXXFLAG_FOR_SOURCE VARIABLE DESCRIPTION SOURCE CXXFLAGSVAR)
+
     IF(NOT DEFINED ${VARIABLE})
         # Insert a blank element last in the list (try without any flags too)
         # This must come last, since some compilers (Intel) might try to
@@ -87,13 +89,15 @@ FUNCTION(GMX_FIND_CXXFLAG_FOR_SOURCE VARIABLE DESCRIPTION SOURCE CXXFLAGSVAR)
                 set(${VARIABLE}_FLAG "${_testflag}" CACHE INTERNAL "${DESCRIPTION}")
                 set(${VARIABLE} 1 CACHE INTERNAL "Result of test for ${DESCRIPTION}" FORCE)
                 break()
-            else(${${COMPILE_VARIABLE}})
+            else()
                 set(${VARIABLE} 0 CACHE INTERNAL "Result of test for ${DESCRIPTION}" FORCE)
-            endif(${${COMPILE_VARIABLE}})
+            endif()
         endforeach()
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
+
     IF (${VARIABLE})
         SET (${CXXFLAGSVAR} "${${CXXFLAGSVAR}} ${${VARIABLE}_FLAG}" PARENT_SCOPE)
-    ENDIF (${VARIABLE})
+    ENDIF ()
+
 ENDFUNCTION(GMX_FIND_CXXFLAG_FOR_SOURCE VARIABLE DESCRIPTION SOURCE CXXFLAGSVAR)
 
index 3edd654a0ebf280d8571ce431d337e5cf9218510..78a67531dc0bc9c88671e8df5a209251d2dd5b5c 100644 (file)
@@ -147,9 +147,9 @@ elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")
 elseif(${GMX_FFT_LIBRARY} STREQUAL "FFTPACK")
     set(GMX_FFT_FFTPACK 1)
     set(FFT_STATUS_MESSAGE "Using internal FFT library - fftpack")
-else(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
+else()
     gmx_invalid_option_value(GMX_FFT_LIBRARY)
-endif(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
+endif()
 gmx_check_if_changed(FFT_CHANGED GMX_FFT_LIBRARY)
 if (FFT_CHANGED)
     message(STATUS "${FFT_STATUS_MESSAGE}")
index 892f6a429270e997fb12adcbd41dfa092cfd107a..569f028de41446f8ae36712c71a51b9494ca9b08 100644 (file)
@@ -118,7 +118,7 @@ ${_msg}")
             message(STATUS "No compatible CUDA toolkit found (v4.0+), disabling native GPU acceleration")
             set_property(CACHE GMX_GPU PROPERTY VALUE OFF)
             set(CUDA_NOTFOUND_AUTO ON)
-        else ()
+        else()
             # the user requested CUDA, but it wasn't found
             message(FATAL_ERROR "${CUDA_NOTFOUND_MESSAGE}")
         endif()
@@ -168,11 +168,11 @@ macro(get_cuda_compiler_info COMPILER_INFO COMPILER_FLAGS)
                 string(REGEX REPLACE "[ ]+" ";" _cxx_flags_nospace "${BUILD_CXXFLAGS}")
             endif()
             SET(${COMPILER_FLAGS} "${CUDA_NVCC_FLAGS}${CUDA_NVCC_FLAGS_${_build_type}}; ${_cxx_flags_nospace}")
-        else ()
+        else()
             SET(${COMPILER_INFO} "N/A")
             SET(${COMPILER_FLAGS} "N/A")
-        endif ()
-    endif ()
+        endif()
+    endif()
 endmacro ()
 
 macro(gmx_gpu_setup)
index fb723187da53f79d2aad5ac504c0913f8c6bb415..aa1df74a5dfee891972a37cddd48ca0826397a48 100644 (file)
@@ -140,7 +140,7 @@ macro(manage_linear_algebra_library name function_in_library)
     if(GMX_EXTERNAL_${name})
         if (NOT _library_was_found)
             message(FATAL_ERROR "You have set GMX_EXTERNAL_${name}=ON to instruct GROMACS to use an external ${name} library, but no external library could be detected.")
-        endif ()
+        endif()
         # Actually trigger linking.
         list(APPEND LINEAR_ALGEBRA_LIBRARIES ${_libraries_to_link})
     else()
index 735ebf352b102251a6a544bd620a54551d1a838a..5adc2627cdf2f49f17237a8d209ce3c7ee4575a7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -39,7 +39,7 @@ if(GMX_MPI)
     message(STATUS "MPI is not compatible with thread-MPI. Disabling thread-MPI.")
     set(GMX_THREAD_MPI OFF CACHE BOOL
         "Build a thread-MPI-based multithreaded version of GROMACS (not compatible with MPI)" FORCE)
-  endif(GMX_THREAD_MPI)
+  endif()
 
   # Test the CMAKE_C_COMPILER for being an MPI (wrapper) compiler
   TRY_COMPILE(MPI_FOUND ${CMAKE_BINARY_DIR}
@@ -146,12 +146,12 @@ if(GMX_MPI)
         mark_as_advanced(file_cmd)
     endif()
 
-  else(MPI_FOUND)
+  else()
       message(FATAL_ERROR
         "MPI support requested, but no MPI compiler found. Either set the "
         "C-compiler (CMAKE_C_COMPILER) to the MPI compiler (often called mpicc), "
         "or set the variables reported missing for MPI_C above.")
-  endif(MPI_FOUND)
+  endif()
 
   include(gmxTestCatamount)
   gmx_test_catamount(GMX_CRAY_CATAMOUNT)
@@ -163,4 +163,4 @@ if(GMX_MPI)
 
   set(GMX_LIB_MPI 1)
   set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_LIB_MPI")
-endif(GMX_MPI)
+endif()
index d7b558974be39b44eb26a2b5c69ff90a4621561f..9993497ebfe37853effe73610541614005545146 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -66,10 +66,10 @@ if(GMX_OPENMP)
                     endif()
                 endif()
             endif()
-        else(OPENMP_FOUND)
+        else()
             message(WARNING
                     "The compiler you are using does not support OpenMP parallelism. This might hurt your performance a lot, in particular with GPUs. Try using a more recent version, or a different compiler. For now, we are proceeding by turning off OpenMP.")
             set(GMX_OPENMP OFF CACHE STRING "Whether GROMACS will use OpenMP parallelism." FORCE)
-        endif(OPENMP_FOUND)
+        endif()
     endif()
 endif()
index 7e404f09677268bac556baf85363ca7091fd2d25..6d4eb672e0191c5c9cca06affc2be18edcd6180c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -79,4 +79,4 @@ unset(SUFFIXES_CHANGED)
 
 if (GMX_BUILD_MDRUN_ONLY)
     set(GMX_LIBS_SUFFIX "_mdrun${GMX_LIBS_SUFFIX}")
-endif ()
+endif()
index 1cbf7c89aa9d34d441862f7cd2b09b2cfd596977..7da67d4403e7a0284ecf4b837baa8ec8d27f8777 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -78,7 +78,7 @@ function(GMX_OPTION_MULTICHOICE NAME DESCRIPTION DEFAULT)
     if (_found_index EQUAL -1)
         message(FATAL_ERROR "Invalid value for ${NAME}: ${_org_value}.  "
                             "Pick one of: ${_allowed_comma_separated}")
-    endif ()
+    endif()
     # Always provide the upper-case value to the caller
     set(${NAME} "${${NAME}}" PARENT_SCOPE)
 endfunction()
index 42a65bf9774ee9ea47f1bfee78dc1db0b43c8806..277ed54c7d63274e304dd490d64143e5a6d406ac 100644 (file)
@@ -60,9 +60,9 @@ macro(gmx_set_build_information)
 
     if(GMX_X86_GCC_INLINE_ASM)
         set(GCC_INLINE_ASM_DEFINE "-DGMX_X86_GCC_INLINE_ASM")
-    else(GMX_X86_GCC_INLINE_ASM)
+    else()
         set(GCC_INLINE_ASM_DEFINE "")
-    endif(GMX_X86_GCC_INLINE_ASM)
+    endif()
 
     message(STATUS "Setting build user/date/host/cpu information")
     if(CMAKE_HOST_UNIX)
@@ -74,12 +74,12 @@ macro(gmx_set_build_information)
         execute_process( COMMAND uname -srm OUTPUT_VARIABLE TMP_HOST OUTPUT_STRIP_TRAILING_WHITESPACE)
         set(BUILD_HOST    "@TMP_HOST@" CACHE INTERNAL "Build host & architecture")
         message(STATUS "Setting build user & time - OK")
-    else(CMAKE_HOST_UNIX)
+    else()
         set(BUILD_USER    "Anonymous@unknown [CMAKE]" CACHE INTERNAL "Build user")
         set(BUILD_TIME    "Unknown date" CACHE INTERNAL "Build date & time")
         set(BUILD_HOST    "@CMAKE_HOST_SYSTEM@ @CMAKE_HOST_SYSTEM_PROCESSOR@" CACHE INTERNAL "Build host & architecture")
         message(STATUS "Setting build user & time - not on Unix, using anonymous")
-    endif(CMAKE_HOST_UNIX)
+    endif()
 
     if(NOT CMAKE_CROSSCOMPILING)
         # Get CPU information, e.g. for deciding what SIMD support exists
@@ -157,8 +157,8 @@ macro(gmx_set_build_information)
             set(BUILD_CPU_FEATURES ""                      CACHE INTERNAL "Build CPU features")
         endif()
 
-    else(NOT CMAKE_CROSSCOMPILING)
-        
+    else()
+
         set(BUILD_CPU_VENDOR   "Unknown, cross-compiled"   CACHE INTERNAL "Build CPU vendor")
         set(BUILD_CPU_BRAND    "Unknown, cross-compiled"    CACHE INTERNAL "Build CPU brand")
         set(BUILD_CPU_FAMILY   "0"   CACHE INTERNAL "Build CPU family")
@@ -166,8 +166,7 @@ macro(gmx_set_build_information)
         set(BUILD_CPU_STEPPING "0" CACHE INTERNAL "Build CPU stepping")
         set(BUILD_CPU_FEATURES "" CACHE INTERNAL "Build CPU features")
 
-    endif(NOT CMAKE_CROSSCOMPILING)
+    endif()
 
     ENDIF(NOT DEFINED BUILD_USER)
 endmacro(gmx_set_build_information)
-
index 40d76c78ac16ed00f83222208c5c7e495ab28990..028bb49ad9207a2d625ce51c3147db694ef56a15 100644 (file)
@@ -64,9 +64,5 @@ MACRO(GMX_TEST_AVX_GCC_MASKLOAD_BUG VARIABLE AVX_CFLAGS)
                 MESSAGE(STATUS "Checking for gcc AVX maskload bug - not present")
             ENDIF()
         ENDIF()
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
 ENDMACRO()
-
-
-
-
index d3034a0b2fbb7a8f8f37a04b6048c00e07559670..00671573fc875732032f309c6718ba06d209cbe3 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009, by the GROMACS development team, led by
+# Copyright (c) 2009,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -72,26 +72,26 @@ MACRO(GMX_TEST_FLOAT_FORMAT FP_IEEE754 FP_BIG_ENDIAN_BYTE FP_BIG_ENDIAN_WORD)
                 IF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
                     SET(GMX_IEEE754_BB_BW TRUE)
                     SET(GMX_IEEE754_LB_LW FALSE)
-                ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
+                ELSE()
                     SET(GMX_IEEE754_BB_BW FALSE)
                     SET(GMX_IEEE754_LB_LW TRUE)
-                ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
+                ENDIF()
                 MESSAGE(STATUS "GMX_TEST_IEEE754_FORMAT found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !")
-            ENDIF(GMX_IEEE754_BB_BW  AND  GMX_IEEE754_LB_LW)
+            ENDIF()
 
             IF(GMX_IEEE754)
                 SET(${FP_IEEE754} 1 CACHE INTERNAL "Result of test for IEEE754 FP format" FORCE)
-            ENDIF(GMX_IEEE754)
+            ENDIF()
 
             IF(GMX_IEEE754_BB_BW  OR  GMX_IEEE754_BB_LW)
                 SET(${FP_BIG_ENDIAN_BYTE} 1 CACHE INTERNAL "Result of test for big endian FP byte order" FORCE)
-            ENDIF(GMX_IEEE754_BB_BW  OR  GMX_IEEE754_BB_LW)
+            ENDIF()
 
             IF(GMX_IEEE754_BB_BW  OR  GMX_IEEE754_LB_BW)
                 SET(${FP_BIG_ENDIAN_WORD} 1 CACHE INTERNAL "Result of test for big endian FP word order" FORCE)
-            ENDIF(GMX_IEEE754_BB_BW  OR  GMX_IEEE754_LB_BW)
+            ENDIF()
 
-        endif(HAVE_${FP_IEEE754})
+        endif()
 
         # just some informational output for the user
         if(GMX_IEEE754_BB_BW)
@@ -102,10 +102,10 @@ MACRO(GMX_TEST_FLOAT_FORMAT FP_IEEE754 FP_BIG_ENDIAN_BYTE FP_BIG_ENDIAN_WORD)
             MESSAGE(STATUS "Checking floating point format - IEEE754 (LE byte, BE word)")
         elseif(GMX_IEEE754_LB_LW)
             MESSAGE(STATUS "Checking floating point format - IEEE754 (LE byte, LE word)")
-        else(GMX_IEEE754_LB_LW)
+        else()
             MESSAGE(STATUS "Checking floating point format - unknown")
-        endif(GMX_IEEE754_BB_BW)
-    ENDIF(NOT DEFINED HAVE_${FP_IEEE754})
+        endif()
+    ENDIF()
 ENDMACRO(GMX_TEST_FLOAT_FORMAT FP_IEEE754 FP_BIG_ENDIAN_BYTE FP_BIG_ENDIAN_WORD)
 
 
index 335f19b5597fa07a2443dac3e94e0a20d3c58c73..c9e812598160ee9cb0d83d8c4df8108450595c08 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2012, by the GROMACS development team, led by
+# Copyright (c) 2009,2012,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -47,24 +47,20 @@ MACRO(GMX_TEST_INLINE VARIABLE)
 
        FOREACH(KEYWORD "__inline__" "__inline" "inline")
             IF(NOT TEST_${VARIABLE})
-                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"    
+                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"
                             "${CMAKE_SOURCE_DIR}/cmake/TestInline.c"
                             COMPILE_DEFINITIONS "-DTESTINLINEDEF=${KEYWORD}" )
                 SET(LAST_INLINE_KEYWORD ${KEYWORD})
-           ENDIF(NOT TEST_${VARIABLE})
+           ENDIF()
         ENDFOREACH(KEYWORD)
 
         IF(TEST_${VARIABLE})
             SET(${VARIABLE} ${LAST_INLINE_KEYWORD} CACHE INTERNAL "Inline keyword" FORCE)
             MESSAGE(STATUS "Checking for inline keyword - ${LAST_INLINE_KEYWORD}")
-        ELSE(TEST_${VARIABLE})
+        ELSE()
            SET(${VARIABLE} " " CACHE INTERNAL "Inline keyword" FORCE)
             MESSAGE(STATUS "Checking for inline keyword - not found")
-        ENDIF(TEST_${VARIABLE})
+        ENDIF()
 
-    ENDIF(NOT DEFINED TEST_${VARIABLE})        
+    ENDIF()
 ENDMACRO(GMX_TEST_INLINE VARIABLE)
-
-
-
-
index 1d38f481dd829e78a6a67ac082eb19053d5ac159..3ed3400d80d64d6dff0b0327f767213b061ee0fb 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2010,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -50,12 +50,12 @@ MACRO(GMX_TEST_INLINE_ASM_GCC_X86 VARIABLE)
         if(${VARIABLE})
             MESSAGE(STATUS "Checking for GCC x86 inline asm - supported")
             set(${VARIABLE} 1 CACHE INTERNAL "Result of test for GCC x86 inline asm" FORCE)
-        else(${VARIABLE})
+        else()
             MESSAGE(STATUS "Checking for GCC x86 inline asm - not supported")
             set(${VARIABLE} 0 CACHE INTERNAL "Result of test for GCC x86 inline asm" FORCE)
-        endif(${VARIABLE})
+        endif()
 
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
 ENDMACRO(GMX_TEST_INLINE_ASM_GCC_X86 VARIABLE)
 
 
index ca0f7d65abeaf9903da005e82006aa4dead7861e..0a4a8077b3f50dc2667564400b43ed6676dd4f09 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012, by the GROMACS development team, led by
+# Copyright (c) 2012,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -48,6 +48,7 @@
 #
 
 MACRO(gmx_test_isfinite VARIABLE)
+
   if(NOT DEFINED isfinite_compile_ok)
     MESSAGE(STATUS "Checking for isfinite")
 
@@ -64,20 +65,23 @@ int main(void) {
 
     if(isfinite_compile_ok)
         MESSAGE(STATUS "Checking for isfinite - yes")
-    else(isfinite_compile_ok)
+    else()
         MESSAGE(STATUS "Checking for isfinite - no")
-    endif(isfinite_compile_ok)
+    endif()
     set(isfinite_compile_ok "${isfinite_compile_ok}" CACHE INTERNAL "Result of isfinite check")
     set(CMAKE_REQUIRED_INCLUDES)
     set(CMAKE_REQUIRED_LIBRARIES)
-  endif(NOT DEFINED isfinite_compile_ok)
+  endif()
+
   if(isfinite_compile_ok)
     set(${VARIABLE} ${isfinite_compile_ok}
                 "Result of test for isfinite")
   endif()
+
 ENDMACRO(gmx_test_isfinite VARIABLE)
 
 MACRO(gmx_test__isfinite VARIABLE)
+
   if(NOT DEFINED _isfinite_compile_ok)
     MESSAGE(STATUS "Checking for _isfinite")
 
@@ -94,21 +98,24 @@ int main(void) {
 
     if(_isfinite_compile_ok)
         MESSAGE(STATUS "Checking for _isfinite - yes")
-    else(_isfinite_compile_ok)
+    else()
         MESSAGE(STATUS "Checking for _isfinite - no")
-    endif(_isfinite_compile_ok)
+    endif()
     set(_isfinite_compile_ok "${_isfinite_compile_ok}" CACHE INTERNAL "Result of _isfinite check")
     set(CMAKE_REQUIRED_INCLUDES)
     set(CMAKE_REQUIRED_LIBRARIES)
-  endif(NOT DEFINED _isfinite_compile_ok)
+  endif()
+
   if(_isfinite_compile_ok)
     set(${VARIABLE} ${_isfinite_compile_ok}
                 "Result of test for _isfinite")
   endif()
+
 ENDMACRO(gmx_test__isfinite VARIABLE)
 
 # Necessary for MSVC
 MACRO(gmx_test__finite VARIABLE)
+
   if(NOT DEFINED _finite_compile_ok)
     MESSAGE(STATUS "Checking for _finite")
 
@@ -122,14 +129,16 @@ int main(void) {
 
     if(_finite_compile_ok)
         MESSAGE(STATUS "Checking for _finite - yes")
-    else(_finite_compile_ok)
+    else()
         MESSAGE(STATUS "Checking for _finite - no")
-    endif(_finite_compile_ok)
+    endif()
     set(_finite_compile_ok "${_finite_compile_ok}" CACHE INTERNAL "Result of _finite check")
     set(CMAKE_REQUIRED_INCLUDES)
-  endif(NOT DEFINED _finite_compile_ok)
+  endif()
+
   if(_finite_compile_ok)
     set(${VARIABLE} ${_finite_compile_ok}
                 "Result of test for _finite")
   endif()
+
 ENDMACRO(gmx_test__finite VARIABLE)
index 4570b4297e8de85e217e5cf229979eea31d8fa1b..6753022e28ce3313e528e7c6f93fbc4bb90671db 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2010,2012, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2012,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -61,7 +61,7 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
                     "${CMAKE_SOURCE_DIR}/cmake/TestFileOffsetBits.c")
         if(FILE64_OK)
             MESSAGE(STATUS "Checking for 64-bit off_t - present")
-        endif(FILE64_OK)
+        endif()
 
         if(NOT FILE64_OK)
             # Test with _FILE_OFFSET_BITS=64
@@ -71,8 +71,8 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
             if(FILE64_OK)
                 MESSAGE(STATUS "Checking for 64-bit off_t - present with _FILE_OFFSET_BITS=64")
                 set(_FILE_OFFSET_BITS 64 CACHE INTERNAL "64-bit off_t requires _FILE_OFFSET_BITS=64")
-            endif(FILE64_OK)
-        endif(NOT FILE64_OK)
+            endif()
+        endif()
 
         if(NOT FILE64_OK)
             # Test with _LARGE_FILES
@@ -82,8 +82,8 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
             if(FILE64_OK)
                 MESSAGE(STATUS "Checking for 64-bit off_t - present with _LARGE_FILES")
                 set(_LARGE_FILES 1 CACHE INTERNAL "64-bit off_t requires _LARGE_FILES")
-            endif(FILE64_OK)
-        endif(NOT FILE64_OK)
+            endif()
+        endif()
 
         if(NOT FILE64_OK)
             # Test with _LARGEFILE_SOURCE
@@ -93,12 +93,12 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
             if(FILE64_OK)
                 MESSAGE(STATUS "Checking for 64-bit off_t - present with _LARGEFILE_SOURCE")
                 set(_LARGEFILE_SOURCE 1 CACHE INTERNAL "64-bit off_t requires _LARGEFILE_SOURCE")
-            endif(FILE64_OK)
-        endif(NOT FILE64_OK)
+            endif()
+        endif()
 
         if(NOT FILE64_OK)
             MESSAGE(STATUS "Checking for 64-bit off_t - not present")
-        else(NOT FILE64_OK)
+        else()
             # 64-bit off_t found. Now check that ftello/fseeko is available.
 
             # Set the flags we might have determined to be required above
@@ -111,7 +111,7 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
                         "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestLargeFiles.c")
             if(FSEEKO_COMPILE_OK)
                 MESSAGE(STATUS "Checking for fseeko/ftello - present")
-            endif(FSEEKO_COMPILE_OK)
+            endif()
 
             if(NOT FSEEKO_COMPILE_OK)
                 # glibc 2.2 neds _LARGEFILE_SOURCE for fseeko (but not 64-bit off_t...)
@@ -121,12 +121,12 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
                 if(FSEEKO_COMPILE_OK)
                     MESSAGE(STATUS "Checking for fseeko/ftello - present with _LARGEFILE_SOURCE")
                     set(_LARGEFILE_SOURCE 1 CACHE INTERNAL "64-bit fseeko requires _LARGEFILE_SOURCE")
-                else(FSEEKO_COMPILE_OK)
+                else()
                     set(FILE64_OK 0)
                     message(STATUS "64-bit off_t present but fseeko/ftello not found!")
-                endif(FSEEKO_COMPILE_OK)
-            endif(NOT FSEEKO_COMPILE_OK)
-        endif(NOT FILE64_OK)
+                endif()
+            endif()
+        endif()
 
         if(NOT FILE64_OK)
             # now check for Windows stuff
@@ -135,8 +135,8 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
             if(FILE64_OK)
                 MESSAGE(STATUS "Checking for 64-bit off_t - present with _fseeki64")
                 set(HAVE__FSEEKI64 1 CACHE INTERNAL "64-bit off_t requires _fseeki64")
-            endif(FILE64_OK)
-        endif(NOT FILE64_OK)
+            endif()
+        endif()
 
         if(FSEEKO_COMPILE_OK)
             SET(${VARIABLE} 1 CACHE INTERNAL "Result of test for large file support" FORCE)
@@ -154,7 +154,7 @@ MACRO(GMX_TEST_LARGE_FILES VARIABLE)
             endif()
         endif()
 
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
 ENDMACRO(GMX_TEST_LARGE_FILES VARIABLE)
 
 
index f1f115274adfbbec069028e266143f614d82bed8..3ed73251a9f4d8ffa47ac40e902aa88b7fb39fac 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2011,2012, by the GROMACS development team, led by
+# Copyright (c) 2009,2011,2012,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -56,16 +56,16 @@ int main(void) {
 
     if(MPI_IN_PLACE_COMPILE_OK)
         MESSAGE(STATUS "Checking for MPI_IN_PLACE - yes")
-    else(MPI_IN_PLACE_COMPILE_OK)
+    else()
         MESSAGE(STATUS "Checking for MPI_IN_PLACE - no")
-    endif(MPI_IN_PLACE_COMPILE_OK)
+    endif()
     set(MPI_IN_PLACE_COMPILE_OK "${MPI_IN_PLACE_COMPILE_OK}" CACHE INTERNAL "Result of mpi_in_place check")
     set(CMAKE_REQUIRED_DEFINITIONS)
     set(CMAKE_REQUIRED_INCLUDES)
     set(CMAKE_REQUIRED_LIBRARIES)
   endif()
   if (MPI_IN_PLACE_COMPILE_OK)
-    set(${VARIABLE} ${MPI_IN_PLACE_COMPILE_OK} 
+    set(${VARIABLE} ${MPI_IN_PLACE_COMPILE_OK}
       "Result of test for MPI_IN_PLACE")
   endif()
 ENDMACRO(GMX_TEST_MPI_IN_PLACE VARIABLE)
index 55461b4f7f8b0b0c50ed1f84d9083662da0d811a..5ac14cda520a212e8fc2605d9ab7e3c6b5f344f6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009, by the GROMACS development team, led by
+# Copyright (c) 2009,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 
 MACRO(GMX_TEST_PIPES VARIABLE)
     IF(NOT DEFINED ${VARIABLE})
-        
+
         MESSAGE(STATUS "Checking for pipe support")
 
-        TRY_COMPILE(HAVE_PIPES "${CMAKE_BINARY_DIR}"    
+        TRY_COMPILE(HAVE_PIPES "${CMAKE_BINARY_DIR}"
                     "${CMAKE_SOURCE_DIR}/cmake/TestPipes.c")
 
-    ENDIF(NOT DEFINED ${VARIABLE})
+    ENDIF()
 ENDMACRO(GMX_TEST_PIPES VARIABLE)
 
-
-
-
index f496ec97c78cdde4f0eace1de630461c8eb26f29..391e8e4882da10b1a5e42390eb74d229dfb04e85 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2012, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -48,24 +48,20 @@ MACRO(GMX_TEST_RESTRICT VARIABLE)
 # Start with __restrict__, since that is the C++ default keyword.
        FOREACH(KEYWORD "__restrict__" "__restrict" "restrict")
             IF(NOT TEST_${VARIABLE})
-                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"    
+                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"
                             "${CMAKE_SOURCE_DIR}/cmake/TestRestrict.c"
                             COMPILE_DEFINITIONS "-DTESTRESTRICTDEF=${KEYWORD}" )
                 SET(LAST_RESTRICT_KEYWORD ${KEYWORD})
-            ENDIF(NOT TEST_${VARIABLE})
+            ENDIF()
         ENDFOREACH(KEYWORD)
 
         IF(TEST_${VARIABLE})
             SET(${VARIABLE} ${LAST_RESTRICT_KEYWORD} CACHE INTERNAL "Restrict keyword" FORCE)
             MESSAGE(STATUS "Checking for restrict keyword - ${LAST_RESTRICT_KEYWORD}")
-        ELSE(TEST_${VARIABLE})
+        ELSE()
            SET(${VARIABLE} " " CACHE INTERNAL "Restrict keyword" FORCE)
             MESSAGE(STATUS "Checking for restrict keyword - not found")
-        ENDIF(TEST_${VARIABLE})
+        ENDIF()
 
-    ENDIF(NOT DEFINED TEST_${VARIABLE})        
+    ENDIF()
 ENDMACRO(GMX_TEST_RESTRICT VARIABLE)
-
-
-
-
index b37c6dc4588b191b46afbcb0c6fb1580f9239f5b..5756729234500f33855956394db0d096dfcf0db8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2011, by the GROMACS development team, led by
+# Copyright (c) 2009,2011,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 
 MACRO(GMX_TEST_SIGUSR1 VARIABLE)
     IF(NOT DEFINED HAVE_${VARIABLE})
-        
+
         MESSAGE(STATUS "Checking for SIGUSR1")
 
-        TRY_COMPILE(HAVE_${VARIABLE} "${CMAKE_BINARY_DIR}"    
+        TRY_COMPILE(HAVE_${VARIABLE} "${CMAKE_BINARY_DIR}"
                     "${CMAKE_SOURCE_DIR}/cmake/TestSIGUSR1.c")
 
-       IF(HAVE_${VARIABLE})        
+       IF(HAVE_${VARIABLE})
             MESSAGE(STATUS "Checking for SIGUSR1 - found")
             set(${VARIABLE} 1 CACHE INTERNAL "Result of test for SIGUSR1" FORCE)
-        ELSE(HAVE_${VARIABLE})
+        ELSE()
             MESSAGE(STATUS "Checking for SIGUSR1 - not found")
             set(${VARIABLE} 0 CACHE INTERNAL "Result of test for SIGUSR1" FORCE)
-        ENDIF(HAVE_${VARIABLE})
-        
-    ENDIF(NOT DEFINED HAVE_${VARIABLE})
-ENDMACRO(GMX_TEST_SIGUSR1 VARIABLE)
-
+        ENDIF()
 
+    ENDIF()
+ENDMACRO(GMX_TEST_SIGUSR1 VARIABLE)
index 68d292588f66723a8c1cf03759a0024e975fea84..d06385294dc4a5c5aae66e97233af241fffd3faa 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009, by the GROMACS development team, led by
+# Copyright (c) 2009,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -46,18 +46,18 @@ MACRO(GMX_TEST_XDR VARIABLE)
         MESSAGE(STATUS "Checking for system XDR support")
 
        # First check without any special flags
-        TRY_COMPILE(XDR_COMPILE_OK "${CMAKE_BINARY_DIR}"    
+        TRY_COMPILE(XDR_COMPILE_OK "${CMAKE_BINARY_DIR}"
                     "${CMAKE_SOURCE_DIR}/cmake/TestXDR.c")
 
         if(XDR_COMPILE_OK)
-           MESSAGE(STATUS "Checking for system XDR support - present")                 
-        else(XDR_COMPILE_OK)
+           MESSAGE(STATUS "Checking for system XDR support - present")
+        else()
             MESSAGE(STATUS "Checking for system XDR support - not present")
-       endif(XDR_COMPILE_OK)
+       endif()
 
         set(${VARIABLE} ${XDR_COMPILE_OK} CACHE INTERNAL "Result of test for system XDR support" FORCE)
-        
-    ENDIF(NOT DEFINED ${VARIABLE})
+
+    ENDIF()
 ENDMACRO(GMX_TEST_XDR VARIABLE)
 
 
index cfa72f74100156f2151ff387f1b05c488a28860b..632f64bbb651f5046fe56fa080b6dd09d2ff6729 100644 (file)
@@ -44,9 +44,9 @@ if (DOXYGEN_FOUND)
     if (DOXYGEN_MSCGEN_EXECUTABLE)
         set(DOXYGEN_MSCGEN_FOUND TRUE)
         get_filename_component(DOXYGEN_MSCGEN_PATH "${DOXYGEN_MSCGEN_EXECUTABLE}" PATH)
-    endif (DOXYGEN_MSCGEN_EXECUTABLE)
+    endif()
     mark_as_advanced(DOXYGEN_MSCGEN_EXECUTABLE)
-endif (DOXYGEN_FOUND)
+endif()
 
 gmx_dependent_option(
     GMX_COMPACT_DOXYGEN
@@ -115,7 +115,7 @@ if (DOXYGEN_FOUND)
         set(GMX_PROJECT_VERSION_STR ${PROJECT_VERSION})
         configure_file(Doxyfile-version.cmakein Doxyfile-version)
     endif()
-endif (DOXYGEN_FOUND)
+endif()
 
 find_package(PythonInterp)
 
@@ -158,4 +158,4 @@ if (PYTHONINTERP_FOUND AND NOT PYTHON_VERSION_STRING VERSION_LESS "2.6")
         -DMODE=CHECKDOC
         -P ${CMAKE_SOURCE_DIR}/admin/includedeps.cmake
         COMMENT "Checking some aspects of Doxygen documentation" VERBATIM)
-endif ()
+endif()
index caa02b92b5b715979866270df1537329f5e1819c..8c0db4ed84de7bc9204204ec640c098063bd2a67 100644 (file)
@@ -40,7 +40,7 @@ get_compiler_info(C BUILD_C_COMPILER BUILD_CFLAGS)
 get_compiler_info(CXX BUILD_CXX_COMPILER BUILD_CXXFLAGS)
 if(GMX_GPU)
     get_cuda_compiler_info(CUDA_NVCC_COMPILER_INFO CUDA_NVCC_COMPILER_FLAGS)
-endif(GMX_GPU)
+endif()
 
 configure_file(config.h.cmakein config.h)
 configure_file(buildinfo.h.cmakein buildinfo.h ESCAPE_QUOTES)
index c3a985e2f3d59a19f89276c4881203e569b335e1..99b6f7da69015ce20b957e3bb411a78004b123b2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2011,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2011,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -41,7 +41,7 @@ find_package(Threads)
 set(PTHREADS_LIBRARIES)
 if (CMAKE_USE_PTHREADS_INIT)
     set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-endif ()
+endif()
 
 set(GMOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 set(GTEST_DIR ${GMOCK_DIR}/gtest)
index 24ab5bb7610840e2b3257a6a91db37fd30701c58..d72b95a26fb798534df44e392269de70412d204b 100644 (file)
@@ -70,7 +70,7 @@ if (NOT GMX_BUILD_MDRUN_ONLY)
     add_subdirectory(selection)
     add_subdirectory(trajectoryanalysis)
     add_subdirectory(tools)
-endif ()
+endif()
 
 list(APPEND LIBGROMACS_SOURCES ${GMXLIB_SOURCES} ${MDLIB_SOURCES})
 
@@ -112,7 +112,7 @@ endif()
 add_library(libgromacs ${LIBGROMACS_SOURCES})
 if (GMX_GIT_VERSION_INFO)
     add_dependencies(libgromacs gmx-version)
-endif ()
+endif()
 
 # Recent versions of gcc and clang give warnings on scanner.cpp, which
 # is a generated source file. These are awkward to suppress inline, so
@@ -177,4 +177,4 @@ if (INSTALL_CUDART_LIB) #can be set manual by user
     else()
         message(WARNING "INSTALL_CUDART_LIB only makes sense with GMX_GPU")
     endif()
-endif ()
+endif()
index b2d0e2f9ea72e7e43cb9bffafda77f2abac6bfa7..dabcba9a84e6e825292e79650a5895fafc6f7f9f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -47,4 +47,4 @@ add_subdirectory(modules)
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index eef49c57609c541969f66df5fc7f979a5310e218..62e09d9c01921206222d427041d0cbe18136cd08 100644 (file)
@@ -35,7 +35,7 @@
 set(EXECUTABLE_EXTENSION "")
 if (GMX_NATIVE_WINDOWS OR GMX_CYGWIN)
     set(EXECUTABLE_EXTENSION ".exe")
-endif ()
+endif()
 set(PATH_SEARCH_TEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/test-bin)
 file(MAKE_DIRECTORY ${PATH_SEARCH_TEST_DIR}/bin)
 file(WRITE ${PATH_SEARCH_TEST_DIR}/bin/test-exe${EXECUTABLE_EXTENSION}
@@ -49,7 +49,7 @@ if (UNIX)
         COMMAND ${CMAKE_COMMAND} -E create_symlink
             ${PATH_SEARCH_TEST_DIR}/bin/test-exe
             ${PATH_SEARCH_TEST_DIR}/bin/test-abs-link)
-endif ()
+endif()
 
 gmx_add_unit_test(CommandLineUnitTests commandline-test
                   cmdlinehelpwriter.cpp
index 3e8b453f94ac92339e4e48c19a0796167d88ddd9..0b5ec4bc2634b191d4882ea16094717c3debd457 100644 (file)
@@ -37,4 +37,4 @@ set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${ESSENTIALDYNAMICS_SOURCES} PARENT
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index efa779df40839e91d55aea2ea3759c7e1e4266fb..cb5a51f736a77587c2354730a844cb46cd2809a8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -57,4 +57,4 @@ gmx_install_headers(fft ${FFT_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 56cbbef52cacf25d65c9e76e73d18f87a0fe9ddf..18078dee8149bf6f8e5f3ee7d912ef2c39c04f73 100644 (file)
@@ -72,4 +72,4 @@ endif()
 
 if (BUILD_TESTING)
      add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 45206c3e2eca6ecf3d261d4bf6395d3a62573a78..7c3b7da4a00b1b6183ea07e32449e77f9f8e1de4 100644 (file)
@@ -43,4 +43,4 @@ set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${GMXANA_SOURCES} PARENT_SCOPE)
 
 if(BUILD_TESTING)
     add_subdirectory(legacytests)
-endif(BUILD_TESTING)
+endif()
index ff5a9f4760458afb5db82c3a53bc85fbcc9576eb..ca1b51e731429d0c1573bd72924c35f0ecb8af71 100644 (file)
@@ -44,13 +44,13 @@ file(GLOB GMXLIB_SOURCES *.c *.cpp)
 # to link the functions directly
 #if(GMX_THREAD_MPI)
 #    add_subdirectory(thread_mpi)
-#endif(GMX_THREAD_MPI)
+#endif()
 #target_link_libraries(gmx ${GMX_EXTRA_LIBRARIES} ${THREAD_MPI_LIB})
 
 # Files called xxx_test.c are test drivers with a main() function for module xxx.c,
 # so they should not be included in the library
 file(GLOB_RECURSE NOT_GMXLIB_SOURCES *_test.c *\#*)
-list(REMOVE_ITEM GMXLIB_SOURCES ${NOT_GMXLIB_SOURCES})  
+list(REMOVE_ITEM GMXLIB_SOURCES ${NOT_GMXLIB_SOURCES})
 
 # gpu utils + cuda tools module
 if(GMX_GPU)
index 6aa852f00e2667c81970a6a09dd36c426ba91420..62f082e779a609d0729fbc8d90204756de7fd26c 100644 (file)
@@ -18,8 +18,8 @@ if (THREAD_PTHREADS)
 else (THREAD_PTHREADS)
     if (THREAD_WINDOWS)
         set(THREAD_MPI_LIB_SOURCE winthreads.c ${THREAD_MPI_LIB_SOURCE})
-    endif (THREAD_WINDOWS)
-endif(THREAD_PTHREADS)
+    endif()
+endif()
 
 
 add_library(thread_mpi STATIC ${THREAD_MPI_LIB_SOURCE})
@@ -28,11 +28,11 @@ add_library(thread_mpi STATIC ${THREAD_MPI_LIB_SOURCE})
 target_link_libraries(thread_mpi ${THREAD_LIB})
 
 if (TMPI_CXX_LIB)
-    set(THREAD_MPI_CXX_LIB_SOURCE 
+    set(THREAD_MPI_CXX_LIB_SOURCE
         system_error.cpp )
     add_library(thread_mpi_cxx STATIC ${THREAD_MPI_CXX_LIB_SOURCE})
     target_link_libraries(thread_mpi_cxx thread_mpi)
-endif (TMPI_CXX_LIB)
+endif()
 
 #configure_file(tmpi_config.h.cmakein  tmpi_config.h)
 #add_definitions(-DHAVE_TMPI_CONFIG_H)
index dc51659f4da8806cb6505d036850b02b2d4b700f..63a81b53fc1b9b8385f98e49f3d5e73799b0d67f 100644 (file)
@@ -38,4 +38,4 @@ set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${GMXPREPROCESS_SOURCES} PARENT_SCO
 
 if(BUILD_TESTING)
     add_subdirectory(tests)
-endif(BUILD_TESTING)
+endif()
index d81cacf64baf8e9aab400850aa0907fea05f912a..06d2f09f109ac2998e5b9e8e057e97be060681fc 100644 (file)
@@ -44,4 +44,4 @@ gmx_install_headers(maths ${MATH_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 0e8248ad8494254555a002fb5ec11ca7614b65e7..a6448783a801e320a773c693849876dd948bbe9d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -41,4 +41,4 @@ gmx_install_headers(onlinehelp ${ONLINEHELP_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index a34d845e75e1f4f625404afe504701f269fe9ea4..cfb6a36b5b04e938ecfbc6bb983680bc878506d1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -47,4 +47,4 @@ gmx_install_headers(options ${OPTIONS_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 1938731e0243d2f7e96b96037123a97b94735da6..9c9f21883ddce244fa6f63a946db91065c3b6d6c 100644 (file)
@@ -37,4 +37,4 @@ set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${PULLING_SOURCES} PARENT_SCOPE)
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 9ed59ec14773009500855ba89d25a0f51dabf092..4788a17578a1aa2e0b96d86260c94bd50ba163a5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -48,4 +48,4 @@ gmx_install_headers(selection ${SELECTION_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 7c532ca9a81deb31c1309bbb978aae962ab820c1..34e800a6bcf5f68f9c82825e653c7bcc40ed4d06 100644 (file)
@@ -34,4 +34,4 @@
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 34e002a9ab0c2f2554c371bcdd53404f21474956..e73a1115a948308c939c3146d69b033f571906cb 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -41,4 +41,4 @@ gmx_install_headers(timing ${TIMING_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 80ee76b6e75ee2474eaa51b8e887147839bc8ac4..ac60f30f0f369d34c6573c373c9e03d2aed17f56 100644 (file)
@@ -41,4 +41,4 @@ gmx_install_headers(tools ${TOOLS_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 0bbbe0fb936707bd09de7fd7e98575bc8d1f4941..a27ab151e19b313e819a71578c6151f9d336b931 100644 (file)
@@ -43,4 +43,4 @@ gmx_install_headers(trajectoryanalysis ${TRAJECTORYANALYSIS_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index f7750d5ec1c21597f55b09efb06e6828a4016a5b..4432ea6aefecf109c3d1da14c48fd5e49628ea7c 100644 (file)
@@ -58,4 +58,4 @@ gmx_install_headers(utility ${GENERATED_HEADER_CONFIG})
 
 if (BUILD_TESTING)
     add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
index 783db712092d96d86dc88a05ac15c76bbc2a2f5d..91e97d372e8458f6f5ff593051e473f40556e4b4 100644 (file)
@@ -118,9 +118,9 @@ else()
         configure_file(CreateLinks.cmake.cmakein CreateLinks.cmake @ONLY)
         set(CREATE_LINKS_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateLinks.cmake)
         install(SCRIPT ${CREATE_LINKS_SCRIPT} COMPONENT links)
-    endif ()
+    endif()
 
     if(BUILD_TESTING)
         add_subdirectory(mdrun/tests)
-    endif(BUILD_TESTING)
+    endif()
 endif()
index 17934162cdb68242c8c3ea7d922065c1e7e42a7a..daf252cb2823057f29551926f32d60fd58c24aaa 100644 (file)
@@ -36,7 +36,7 @@ function (gmx_add_unit_test_object_library NAME)
     if (GMX_BUILD_UNITTESTS AND BUILD_TESTING)
         include_directories(${GMOCK_INCLUDE_DIRS})
         add_library(${NAME} OBJECT ${ARGN})
-    endif ()
+    endif()
 endfunction ()
 
 function (gmx_build_unit_test NAME EXENAME)
@@ -53,7 +53,7 @@ function (gmx_build_unit_test NAME EXENAME)
         set(EXTRA_COMPILE_DEFINITIONS TEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}" TEST_TEMP_PATH="${_temporary_files_path}")
 
         set_property(TARGET ${EXENAME} APPEND PROPERTY COMPILE_DEFINITIONS "${EXTRA_COMPILE_DEFINITIONS}")
-    endif ()
+    endif()
 endfunction ()
 
 function (gmx_register_unit_test NAME EXENAME)
@@ -62,7 +62,7 @@ function (gmx_register_unit_test NAME EXENAME)
                  COMMAND ${EXENAME} --gtest_output=xml:${CMAKE_BINARY_DIR}/Testing/Temporary/${NAME}.xml)
         set_tests_properties(${NAME} PROPERTIES LABELS "GTest;UnitTest")
         add_dependencies(tests ${EXENAME})
-    endif ()
+    endif()
 endfunction ()
 
 function (gmx_register_integration_test NAME EXENAME)
@@ -76,7 +76,7 @@ function (gmx_register_integration_test NAME EXENAME)
         # GMX_EXTRA_LIBRARIES might be needed for mdrun integration tests at
         # some point.
         # target_link_libraries(${EXENAME} ${GMX_EXTRA_LIBRARIES})
-    endif ()
+    endif()
 endfunction ()
 
 function (gmx_add_unit_test NAME EXENAME)