Skip to content

Commit

Permalink
CI: Patch matio cmake files for MPI build
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Jan 11, 2023
1 parent abf0b73 commit dd98b1d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
23 changes: 23 additions & 0 deletions TPL/matio/mpi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 126ed8b74e5c3118ca46222503d8cf350d8f1cb8 Mon Sep 17 00:00:00 2001
From: Greg Sjaardema <[email protected]>
Date: Wed, 11 Jan 2023 13:27:50 -0700
Subject: [PATCH] Fix mpi build

---
cmake/thirdParties.cmake | 3 +++
1 file changed, 3 insertions(+)

diff --git a/cmake/thirdParties.cmake b/cmake/thirdParties.cmake
index ae8b4ce..12246ec 100644
--- a/cmake/thirdParties.cmake
+++ b/cmake/thirdParties.cmake
@@ -1,3 +1,6 @@
+include(CMakeFindDependencyMacro)
+find_dependency(MPI)
+
if(MATIO_USE_CONAN AND (MATIO_WITH_HDF5 OR MATIO_WITH_ZLIB))
conan_add_remote(NAME conan-center URL https://center.conan.io VERIFY_SSL False)
endif()
--
2.38.1

9 changes: 8 additions & 1 deletion TPL/matio/runcmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### The following assumes you are building in a subdirectory of ACCESS Root
if [ "X$ACCESS" == "X" ] ; then
ACCESS=$(cd ../../..; pwd)
ACCESS=$(cd ../../../..; pwd)
echo "ACCESS set to ${ACCESS}"
fi
INSTALL_PATH=${INSTALL_PATH:-${ACCESS}}
Expand Down Expand Up @@ -39,6 +39,13 @@ then
LOCAL_ZLIB="-DZLIB_INCLUDE_DIR:PATH=${INSTALL_PATH}/include -DZLIB_LIBRARY:FILEPATH=${INSTALL_PATH}/lib/libz.${LD_EXT}"
fi

if [ "$MPI" == "YES" ]
then
cd ..
git am ../mpi.patch
cd -
fi

rm -f config.cache

cmake .. -DCMAKE_C_COMPILER:FILEPATH=${CC} \
Expand Down

0 comments on commit dd98b1d

Please sign in to comment.