-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4afe381
commit d0a5b7f
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
project(hw4) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED YES) | ||
|
||
find_package(MPI REQUIRED) | ||
find_package(Eigen3 3.3 REQUIRED NO_MODULE) | ||
|
||
# Group number | ||
set(GROUP_NAME "None" CACHE STRING "Your group name as it appears on bCourses (no spaces)") | ||
|
||
# Packaging system | ||
if (NOT ${GROUP_NAME} STREQUAL None) | ||
set(CPACK_GENERATOR TGZ) | ||
set(CPACK_PACKAGE_FILE_NAME "cs267${GROUP_NAME}_hw2_2") | ||
install(FILES distributed_pcg.cpp DESTINATION .) | ||
install(FILES ${CPACK_PACKAGE_FILE_NAME}.pdf DESTINATION .) | ||
include(CPack) | ||
endif () | ||
|
||
# We require the GNU compiler for this assignment. | ||
if (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") | ||
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(pcg distributed_pcg.cpp) | ||
target_link_libraries(pcg PRIVATE MPI::MPI_CXX Eigen3::Eigen) | ||
|
||
|
||
|