Created
October 6, 2017 10:01
-
-
Save l-bat/3a27ac50ac50899417fb3f8910298064 to your computer and use it in GitHub Desktop.
MPI CMake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.4) | |
project(Task1_Batanina) | |
set(CMAKE_CXX_STANDARD 11) | |
set(SOURCE_FILES MPI_main.cpp) | |
#set(SOURCE_FILES main.cpp ) | |
add_executable(Task1_Batanina ${SOURCE_FILES}) | |
find_package(MPI REQUIRED) | |
include_directories(${MPI_INCLUDE_PATH}) | |
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}) | |
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS}) | |
target_link_libraries(Task1_Batanina ${MPI_LIBRARIES}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment