From 5595f7109a217c25c8ff47bc0ccc2ecd265b2af4 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Tue, 13 May 2025 14:14:33 -0400 Subject: [PATCH] build(hypre): added hypre as a subproject --- .gitignore | 1 + mk | 17 +++++++++++++++++ subprojects/hypre.wrap | 7 +++++++ subprojects/packagefiles/hypre/CMakeLists.txt | 6 ++++++ 4 files changed, 31 insertions(+) create mode 100644 subprojects/hypre.wrap create mode 100644 subprojects/packagefiles/hypre/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 6510088..c54117a 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,7 @@ subprojects/hypre/ .vscode/ *.log +mpi-install-log.txt output/ diff --git a/mk b/mk index 8a8f521..c3745aa 100755 --- a/mk +++ b/mk @@ -339,6 +339,23 @@ else fi fi +## --- Check if MPI is installed --- +log "${BLUE}[Info] Checking MPI status...${NC}" +# if the following script exists with anything other than a 0 status the script will exit +if [[ -f ./build-config/mpi/.mpi_installed ]]; then + log "${MAGENTA}[Succsess] MPI already installed. Skipping...${NC}" +else + log "${BLUE}[Info] Installing MPI...${NC}" + if ! ./build-config/mpi/install.sh; then + log "${RED}[Error] MPI check failed. Exiting...${NC}" + exit 1 + else + touch ./build-config/mpi/.mpi_installed + log "${GREEN}[Succsess] MPI check passed.${NC}" + fi +fi + + #check if the last build flags are the same as the current build flags # if the flags are the same skip the configuration step # if they are different then reconfigure the build directory diff --git a/subprojects/hypre.wrap b/subprojects/hypre.wrap new file mode 100644 index 0000000..6e25e35 --- /dev/null +++ b/subprojects/hypre.wrap @@ -0,0 +1,7 @@ +[wrap-git] +url = https://github.com/hypre-space/hypre.git +revision = v2.33.0 +depth = 1 +patch_directory = hypre + +[cmake] \ No newline at end of file diff --git a/subprojects/packagefiles/hypre/CMakeLists.txt b/subprojects/packagefiles/hypre/CMakeLists.txt new file mode 100644 index 0000000..8521326 --- /dev/null +++ b/subprojects/packagefiles/hypre/CMakeLists.txt @@ -0,0 +1,6 @@ +# subprojects/packagefiles/hypre/CMakeLists.txt +cmake_minimum_required(VERSION 3.10) +project(hypre-wrapper C CXX) +add_subdirectory(src) + +# This file is just used to redirect to the src directory where hypre stores its CMakeLists.txt \ No newline at end of file