cmake: fix MPI compiler use

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/14/head
Thorsten Liebig 2016-01-31 13:31:52 +01:00
parent d75069cfef
commit ba72767613
1 changed files with 2 additions and 3 deletions

View File

@ -168,11 +168,10 @@ INCLUDE_DIRECTORIES( ${openEMS_SOURCE_DIR} ) #find tools
message(STATUS "Sources:" ${SOURCES})
if (WITH_MPI)
if (${MPI_CXX_FOUND})
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
SET(CMAKE_C_COMPILER /usr/bin/mpicc)
SET(CMAKE_CXX_COMPILER /usr/bin/mpicxx)
SET(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
endif()
add_library( openEMS SHARED ${SOURCES})