summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/lammps/660.patch24
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py12
2 files changed, 35 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/lammps/660.patch b/var/spack/repos/builtin/packages/lammps/660.patch
new file mode 100644
index 0000000000..9d1d11aff4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lammps/660.patch
@@ -0,0 +1,24 @@
+From b46cc6a6a7410108af84a854818c154a17e0ef42 Mon Sep 17 00:00:00 2001
+From: Christoph Junghans <junghans@lanl.gov>
+Date: Fri, 22 Sep 2017 15:17:44 -0600
+Subject: [PATCH] cmake: fix build with system cmake
+
+---
+ cmake/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index bc33da60de..666b77ae3d 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -665,7 +665,9 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
+ ############################################
+ add_library(lammps ${LIB_SOURCES})
+ target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
+-add_dependencies(lammps ${LAMMPS_DEPS})
++if(LAMMPS_DEPS)
++ add_dependencies(lammps ${LAMMPS_DEPS})
++endif()
+ set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE})
+ if(BUILD_SHARED_LIBS)
+ set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index 7c14dca283..b6be6ccad6 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -36,7 +36,9 @@ class Lammps(CMakePackage):
homepage = "http://lammps.sandia.gov/"
url = "https://github.com/lammps/lammps/archive/patch_1Sep2017.tar.gz"
+ version('20170922', '4306071f919ec7e759bda195c26cfd9a')
version('20170901', '767e7f07289663f033474dfe974974e7')
+ version('develop', git='https://github.com/lammps/lammps', branch='master')
def url_for_version(self, version):
vdate = dt.datetime.strptime(str(version), "%Y%m%d")
@@ -44,7 +46,7 @@ class Lammps(CMakePackage):
vdate.strftime("%d%b%Y").lstrip('0'))
supported_packages = ['voronoi', 'rigid', 'user-nc-dump', 'kspace',
- 'user-atc', 'meam', 'manybody']
+ 'latte', 'user-atc', 'meam', 'manybody']
for pkg in supported_packages:
variant(pkg, default=False,
@@ -60,8 +62,14 @@ class Lammps(CMakePackage):
depends_on('netcdf+mpi', when='+user-nc-dump')
depends_on('blas', when='+user-atc')
depends_on('lapack', when='+user-atc')
+ depends_on('latte', when='+latte')
+ depends_on('blas', when='+latte')
+ depends_on('lapack', when='+latte')
+
+ conflicts('+latte', when='@:20170921')
patch("lib.patch", when="@20170901")
+ patch("660.patch", when="@20170922")
root_cmakelists_dir = 'cmake'
@@ -80,6 +88,8 @@ class Lammps(CMakePackage):
'-DENABLE_KSAPCE={0}'.format(
'ON' if '+kspace' in spec else 'OFF'),
'-DFFT=FFTW3', # doesn't do harm withiout KSPACE
+ '-DENABLE_LATTE={0}'.format(
+ 'ON' if '+latte' in spec else 'OFF'),
'-DENABLE_MANYBODY={0}'.format(
'ON' if '+manybody' in spec else 'OFF'),
'-DENABLE_USER-NETCDF={0}'.format(