-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (22 loc) · 887 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.14)
project(HPC_LUDecomposition)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
find_package(MPI REQUIRED)
# find_package(OpenMP REQUIRED)
# We require the GNU compiler for this assignment.
if (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(Prg-Intel "PrgEnv-intel")
set(Prg-Clang "PrgEnv-cray")
message(WARNING
"Must use GNU Compiler for submission. Make sure you ran:\n"
"module swap ${Prg-${CMAKE_C_COMPILER_ID}} PrgEnv-gnu")
endif ()
add_executable(serial main.cpp serial.cpp)
# add_executable(openmp main.cpp openmp.cpp)
add_executable(mpi main.cpp mpi.cpp)
target_link_libraries(mpi PRIVATE MPI::MPI_CXX)
# target_link_libraries(openmp PRIVATE OpenMP::OpenMP_CXX)
# Copy the job scripts
# configure_file(job-serial job-serial COPYONLY)
# configure_file(job-openmp job-openmp COPYONLY)