From 5d9a6c1fe2e538219f17b83f41a2f6e38c5e0e09 Mon Sep 17 00:00:00 2001 From: Stan Moore <stamoor@sandia.gov> Date: Fri, 1 Dec 2017 16:03:25 -0700 Subject: [PATCH] Add checks to Kokkos Install.sh so that files aren't unnecessarily recompiled --- src/KOKKOS/Install.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index a5ee300e70..e823dc338b 100644 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -28,7 +28,20 @@ action () { # force rebuild of files with LMP_KOKKOS switch -touch ../accelerator_kokkos.h +KOKKOS_INSTALLED=0 +if (test -e ../Makefile.package) then + KOKKOS_INSTALLED=`grep DLMP_KOKKOS ../Makefile.package | wc -l` +fi + +if (test $mode = 1) then + if (test $KOKKOS_INSTALLED = 0) then + touch ../accelerator_kokkos.h + fi +elif (test $mode = 0) then + if (test $KOKKOS_INSTALLED = 1) then + touch ../accelerator_kokkos.h + fi +fi # list of files with optional dependcies -- GitLab