Skip to content

Commit

Permalink
#2174: fix vtk.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Jul 10, 2024
1 parent bcbf787 commit e2fc3f1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
31 changes: 20 additions & 11 deletions ci/deps/vtk.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,37 @@

set -exo pipefail

if test $# -lt 2
if test $# -lt 3
then
echo "usage: ./$0 <vtk-version> <installation-dir>"
echo "usage: ./$0 <vtk-version> <build-root> <num_procs>"
exit 1
fi

base_dir=$(pwd)

vtk_version="$1"
vtk_tar_name="v${vtk_version}.tar.gz"
vtk_name="VTK-${vtk_version}"
install_dir="${2-}"
build_dir=/vtk-build/
build_root="${2-}"

num_procs=$3

wget "https://github.com/Kitware/VTK/archive/refs/tags/$vtk_tar_name"
tar xzf ${vtk_tar_name}
rm ${vtk_tar_name}
cd ${vtk_name}

mkdir -p ${build_dir}
mkdir -p ${install_dir}
mkdir -p ${build_root}
cd ${build_root}

cd ${build_dir}
mkdir -p build
mkdir -p install

cd build
rm -rf ./*
cmake \
-DCMAKE_INSTALL_PREFIX:FILEPATH=${install_dir} \
../${vtk_name}
cmake --build ${build_dir} --target install
-DCMAKE_INSTALL_PREFIX:FILEPATH=${build_root}/install \
${base_dir}/${vtk_name}
cmake --build . --target install -j ${num_procs}

cd ${base_dir}
rm -rf ${vtk_name}
3 changes: 2 additions & 1 deletion ci/docker/ubuntu-gnu-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ ENV LESSCHARSET=utf-8

COPY ./ci/deps/vtk.sh vtk.sh
RUN if [ "$VT_TV_ENABLED" -eq 1]; then \
./vtk.sh 9.3.0 /vtk-install; \
chmod +x vtk.sh && \
./vtk.sh 9.3.0 /vtk-install 4; \
fi

COPY ./ci/deps/mpich.sh mpich.sh
Expand Down

0 comments on commit e2fc3f1

Please sign in to comment.