diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index a5ee300e7002fd3cb183ef813a0b826f3a792b91..e823dc338b8ac06db4cb05363449abbf2f6ab8a3 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