cmake_minimum_required(VERSION 2.2)
project(MPIandMTcounting3s CXX)

set(CMAKE_CONFIGURATION_TYPES "Debug;Release")

find_package(MPI REQUIRED)


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

set(sources MPIandMTcounting3s.cpp) # add all source files here, separated by a comma
set(headers util.h) # all your header files

add_executable(MPIandMTcounting3s ${sources}  ${headers})

SET(CMAKE_CXX_FLAGS  "-std=c++11")  # necessary for chrono

include_directories(SYSTEM ${MPI_INCLUDE_PATH})
target_compile_options(MPIandMTcounting3s PRIVATE ${MPI_CXX_COMPILE_FLAGS} )
target_link_libraries(MPIandMTcounting3s ${MPI_CXX_LIBRARIES} ${MPI_CXX_LINK_FLAGS} -pthread )

set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )

