summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lammps.spec10
1 files changed, 6 insertions, 4 deletions
diff --git a/lammps.spec b/lammps.spec
index 4c2140a..ab2e7e3 100644
--- a/lammps.spec
+++ b/lammps.spec
@@ -219,13 +219,14 @@ set +e
. /etc/profile.d/modules.sh
set -e
+mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
for mpi in '' mpich %{?with_openmpi:openmpi} ; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
#python wrapper isn't mpi specific
- %{cmake3} \
- -C cmake/presets/all_on.cmake \
- -C cmake/presets/nolib.cmake \
+ %{cmake3} ../cmake \
+ -C ../cmake/presets/all_on.cmake \
+ -C ../cmake/presets/nolib.cmake \
%{cmake_blas_flags} \
-DCMAKE_TUNE_FLAGS='' \
-DCMAKE_CUSTOM_LINKER="default" \
@@ -265,7 +266,7 @@ set +e
set -e
for mpi in '' mpich %{?with_openmpi:openmpi} ; do
- %make_install
+ %make_install -C .obj-%{_target_platform}
done
cd python
@@ -290,6 +291,7 @@ set -e
for mpi in '' mpich %{?with_openmpi:openmpi} ; do
old_PYTHONPATH="${PYTHONPATH}"
test -n "${mpi}" && module load mpi/${mpi}-%{_arch} && export PYTHONPATH="${MPI_PYTHON3_SITEARCH}:${PYTHONPATH}"
+ cd .obj-%{_target_platform}
%ctest --output-on-failure %{?testargs} || true
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} && export PYTHONPATH="${old_PYTHONPATH}"
done