cmake_minimum_required(VERSION 2.2)
project(MPIhelloWorld CXX)

set(CMAKE_CONFIGURATION_TYPES "Debug;Release")

find_package(MPI REQUIRED)

message(STATUS "Run: ${MPIEXEC} ")

set(sources MPIhelloWorld.cpp)

add_executable(MPIhelloWorld ${sources})

include_directories(SYSTEM ${MPI_INCLUDE_PATH})
target_compile_options(MPIhelloWorld PRIVATE ${MPI_CXX_COMPILE_FLAGS} )
target_link_libraries(MPIhelloWorld ${MPI_CXX_LIBRARIES} ${MPI_CXX_LINK_FLAGS} )

set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )

