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!
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)
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()
# 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)
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)
"gmx view will not be available.")
endif()
include_directories(${X11_INCLUDE_DIR})
-endif(GMX_X11)
+endif()
include(ThreadMPI)
set(THREAD_MPI_LIB 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)
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)
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)
gmx_test_xdr(GMX_SYSTEM_XDR)
if(NOT GMX_SYSTEM_XDR)
set(GMX_INTERNAL_XDR 1)
-endif(NOT GMX_SYSTEM_XDR)
+endif()
##################################################
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
# 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)
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)
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)
# 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.
add_subdirectory(doxygen)
add_subdirectory(share)
add_subdirectory(scripts)
-endif ()
+endif()
add_subdirectory(src)
if (BUILD_TESTING)
#
# 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.
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()
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)
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})
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()
+++ /dev/null
-# - 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})
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})
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)
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)
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
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)
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)
+++ /dev/null
-# - 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})
-
+#
+# 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.
-
+#
+# 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)
-
+#
+# 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)
-
#=============================================================================
-# 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)
# 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"
# 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)
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)
)
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
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)
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
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
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
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")
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)
# 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
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)
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}")
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()
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)
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()
#
# 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.
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}
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)
set(GMX_LIB_MPI 1)
set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_LIB_MPI")
-endif(GMX_MPI)
+endif()
#
# 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.
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()
#
# 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.
if (GMX_BUILD_MDRUN_ONLY)
set(GMX_LIBS_SUFFIX "_mdrun${GMX_LIBS_SUFFIX}")
-endif ()
+endif()
#
# 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.
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()
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)
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
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")
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)
-
MESSAGE(STATUS "Checking for gcc AVX maskload bug - not present")
ENDIF()
ENDIF()
- ENDIF(NOT DEFINED ${VARIABLE})
+ ENDIF()
ENDMACRO()
-
-
-
-
#
# 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.
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)
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)
#
# 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.
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)
-
-
-
-
#
# 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.
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)
#
# 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.
#
MACRO(gmx_test_isfinite VARIABLE)
+
if(NOT DEFINED isfinite_compile_ok)
MESSAGE(STATUS "Checking for isfinite")
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")
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")
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)
#
# 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.
"${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
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
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
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
"${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...)
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
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)
endif()
endif()
- ENDIF(NOT DEFINED ${VARIABLE})
+ ENDIF()
ENDMACRO(GMX_TEST_LARGE_FILES VARIABLE)
#
# 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.
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)
#
# 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)
-
-
-
#
# 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.
# 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)
-
-
-
-
#
# 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)
#
# 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.
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)
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
set(GMX_PROJECT_VERSION_STR ${PROJECT_VERSION})
configure_file(Doxyfile-version.cmakein Doxyfile-version)
endif()
-endif (DOXYGEN_FOUND)
+endif()
find_package(PythonInterp)
-DMODE=CHECKDOC
-P ${CMAKE_SOURCE_DIR}/admin/includedeps.cmake
COMMENT "Checking some aspects of Doxygen documentation" VERBATIM)
-endif ()
+endif()
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)
#
# 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.
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)
add_subdirectory(selection)
add_subdirectory(trajectoryanalysis)
add_subdirectory(tools)
-endif ()
+endif()
list(APPEND LIBGROMACS_SOURCES ${GMXLIB_SOURCES} ${MDLIB_SOURCES})
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
else()
message(WARNING "INSTALL_CUDART_LIB only makes sense with GMX_GPU")
endif()
-endif ()
+endif()
#
# 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.
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
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}
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
if (BUILD_TESTING)
# add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
#
# 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.
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if(BUILD_TESTING)
add_subdirectory(legacytests)
-endif(BUILD_TESTING)
+endif()
# 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)
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})
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)
if(BUILD_TESTING)
add_subdirectory(tests)
-endif(BUILD_TESTING)
+endif()
if (BUILD_TESTING)
# add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
#
# 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.
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
#
# 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.
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if (BUILD_TESTING)
# add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
#
# 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.
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
#
# 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.
if (BUILD_TESTING)
# add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if (BUILD_TESTING)
# add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
if (BUILD_TESTING)
add_subdirectory(tests)
-endif (BUILD_TESTING)
+endif()
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()
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)
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)
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)
# 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)