#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015,2016,2019, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2019,2020, 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.
find_package(MPI)
if(MPI_C_FOUND)
set(MPI_COMPILE_FLAGS ${MPI_C_COMPILE_FLAGS})
+ separate_arguments(MPI_COMPILE_FLAGS)
set(MPI_LINKER_FLAGS ${MPI_C_LINK_FLAGS})
+ separate_arguments(MPI_C_LINK_FLAGS)
include_directories(SYSTEM ${MPI_C_INCLUDE_PATH})
list(APPEND GMX_COMMON_LIBRARIES ${MPI_C_LIBRARIES})
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2009,2011,2012,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2009,2011,2012,2014,2015,2016,2020, 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 MPI_IN_PLACE_COMPILE_OK)
MESSAGE(STATUS "Checking for MPI_IN_PLACE")
- set(CMAKE_REQUIRED_FLAGS ${MPI_COMPILE_FLAGS})
+ if(CMAKE_VERSION VERSION_LESS 3.12)
+ foreach(_FLAG ${MPI_COMPILE_FLAGS})
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${_FLAG}")
+ endforeach()
+ else()
+ list(JOIN MPI_COMPILE_FLAGS " " CMAKE_REQUIRED_FLAGS)
+ endif()
set(CMAKE_REQUIRED_INCLUDES ${MPI_INCLUDE_PATH})
set(CMAKE_REQUIRED_LIBRARIES ${MPI_LIBRARIES})
check_cxx_source_compiles(