@@ -952,31 +952,21 @@ endif()
952
952
953
953
# # # # # # # # # # NO MORE TESTS AFTER THIS LINE! # # # # # # # # # # #
954
954
# these are set after everything else
955
- if (GMX_LIB_MPI)
956
- # TODO: Restrict the scope of MPI dependence.
957
- # Targets that actually need MPI headers and build tool flags should
958
- # manage their own `target_link_libraries` locally. Such a change is beyond
959
- # the scope of the bug fix for #4678.
960
- set (_gmx_mpi_cxx_link_flags "${MPI_CXX_LINK_FLAGS} " )
961
- set (_gmx_mpi_c_compile_flags "${MPI_C_COMPILE_OPTIONS} ;${MPI_C_COMPILE_DEFINITIONS} " )
962
- set (_gmx_mpi_cxx_compile_flags "${MPI_CXX_COMPILE_OPTIONS} ;${MPI_CXX_COMPILE_DEFINITIONS} " )
963
- endif ()
964
955
if (NOT GMX_SKIP_DEFAULT_CFLAGS)
965
- #TODO(#3672): Use target_link_libraries(... MPI::MPI_CXX) instead of ${MPI_CXX_LINK_FLAGS}
966
- set (CMAKE_EXE_LINKER_FLAGS "${FFT_LINKER_FLAGS} ${_gmx_mpi_cxx_link_flags} ${CMAKE_EXE_LINKER_FLAGS} " )
967
- set (CMAKE_SHARED_LINKER_FLAGS "${FFT_LINKER_FLAGS} ${_gmx_mpi_cxx_link_flags} ${CMAKE_SHARED_LINKER_FLAGS} " )
956
+ set (CMAKE_EXE_LINKER_FLAGS "${FFT_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS} " )
957
+ set (CMAKE_SHARED_LINKER_FLAGS "${FFT_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} " )
968
958
else ()
969
959
message ("Recommended flags which are not added because GMX_SKIP_DEFAULT_CFLAGS=yes:" )
970
- message ("CMAKE_C_FLAGS: ${SIMD_C_FLAGS} ;${_gmx_mpi_c_compile_flags} ; ${ EXTRA_C_FLAGS} ;${GMXC_CFLAGS} " )
960
+ message ("CMAKE_C_FLAGS: ${SIMD_C_FLAGS} ;${EXTRA_C_FLAGS} ;${GMXC_CFLAGS} " )
971
961
foreach (build_type ${build_types_with_explicit_flags} )
972
962
message ("CMAKE_C_FLAGS_${build_type} : ${GMXC_CFLAGS_${build_type} }" )
973
963
endforeach ()
974
- message ("CMAKE_CXX_FLAGS: ${SIMD_CXX_FLAGS} ;${_gmx_mpi_cxx_compile_flags} ; ${ EXTRA_CXX_FLAGS} ;${GMXC_CXXFLAGS} " )
964
+ message ("CMAKE_CXX_FLAGS: ${SIMD_CXX_FLAGS} ;${EXTRA_CXX_FLAGS} ;${GMXC_CXXFLAGS} " )
975
965
foreach (build_type ${build_types_with_explicit_flags} )
976
966
message ("CMAKE_CXX_FLAGS_${build_type} : ${GMXC_CXXFLAGS_${build_type} }" )
977
967
endforeach ()
978
- message ("CMAKE_EXE_LINKER_FLAGS: ${FFT_LINKER_FLAGS} ${_gmx_mpi_cxx_link_flags} " )
979
- message ("CMAKE_SHARED_LINKER_FLAGS: ${FFT_LINKER_FLAGS} ${_gmx_mpi_cxx_link_flags} " )
968
+ message ("CMAKE_EXE_LINKER_FLAGS: ${FFT_LINKER_FLAGS} " )
969
+ message ("CMAKE_SHARED_LINKER_FLAGS: ${FFT_LINKER_FLAGS} " )
980
970
endif ()
981
971
# Allow `admin` directory to be easily conveyed to nested CMake commands.
982
972
set (GMX_ADMIN_DIR ${CMAKE_SOURCE_DIR} /admin)
0 commit comments