Skip to content

Commit

Permalink
batch file for building MPI on M1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Leykin committed Jul 5, 2023
1 parent d76e063 commit de99af6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions M2/BUILD/MPI/cmake.batch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# run in the root dir of repo
brew tap macaulay2/tap
brew install $(brew deps --1 --include-build macaulay2/tap/M2)
deps=$(brew deps --1 --include-optional macaulay2/tap/M2 | tr '\n' ';')
paths=$HOMEBREW_PREFIX/opt/${deps//;/;$HOMEBREW_PREFIX/opt/}

cmake -GNinja -S ./M2 -B ./M2/BUILD/build \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DWITH_MPI=ON \
-DBUILD_NATIVE=OFF \
-DCMAKE_PREFIX_PATH=$paths \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr

cd ./M2/BUILD/build
ninja build-libraries
ninja build-programs
ninja

# CC=`brew --prefix llvm`/bin/clang CXX=`brew --prefix llvm`/bin/clang++ cmake -GNinja -S ../.. -B . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH="`brew --prefix`;`brew --prefix libffi`"

0 comments on commit de99af6

Please sign in to comment.