Commit 8c1b77e4 authored by Christoph Junghans's avatar Christoph Junghans

cmake: workaround for cmake bug#18349

parent 7db1d715
Pipeline #3398 passed with stages
in 45 minutes
......@@ -286,7 +286,10 @@ endif(WITH_VALGRIND_INSTRUMENTATION)
#######################################################################
find_package(MPI REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_COMPILE_FLAGS}")
# Workaround for https://gitlab.kitware.com/cmake/cmake/issues/18349
foreach(_MPI_FLAG ${MPI_COMPILE_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_MPI_FLAG}")
endforeach()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_LINK_FLAGS}")
include_directories(SYSTEM ${MPI_INCLUDE_PATH})
list(APPEND LIBRARIES ${MPI_LIBRARIES})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment