lammps: add support of latte package (#5446)

This commit is contained in:
Christoph Junghans
2017-09-25 10:39:29 -06:00
committed by Todd Gamblin
parent e947a0b152
commit 64311e8510
2 changed files with 35 additions and 1 deletions

View File

@@ -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})

View File

@@ -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 @@ def url_for_version(self, version):
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 @@ def url_for_version(self, version):
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 @@ def cmake_args(self):
'-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(