-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (34 loc) · 1.15 KB
/
CMakeLists.txt
File metadata and controls
41 lines (34 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.20)
project(Distributed_Wavefront)
# Sets the C++ standard to be used for the project to C++17.
set(CMAKE_CXX_STANDARD 17)
# Specifies that the MPI C++ compiler (mpic++) should be used as the C++ compiler.
set(CMAKE_CXX_COMPILER mpic++)
# Sets the compilation flags
set(CMAKE_CXX_FLAGS "-O3")
# If MPI package is not found, the configuration process will stop with an error.
find_package(MPI REQUIRED)
if (MPI_FOUND)
include_directories(${MPI_INCLUDE_PATH})
else()
message(FATAL_ERROR "MPI not found")
endif()
# Adds the MPI include directories to the compiler's search path (used to find mpi.h).
include_directories(${MPI_INCLUDE_PATH}, ./fastflow)
add_executable(Sequential
src/main/wavefront_seq.cpp
src/main/wavefront.hpp
src/main/config.hpp
)
add_executable(MPI_Collective
src/main/wavefront_mpi_collective.cpp
src/main/wavefront.hpp
src/main/config.hpp
)
add_executable(Fastflow
src/main/wavefront_fastflow.cpp
src/main/wavefront.hpp
src/main/config.hpp
)
# Links the MPI libraries to the executable.
target_link_libraries(MPI_Collective ${MPI_LIBRARIES})