diff options
author | Nichols A. Romero <naromero77@users.noreply.github.com> | 2019-10-08 20:46:15 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-10-08 20:46:15 -0500 |
commit | 2794e52ddd58aced74300ce5cd1a2ca30825dd90 (patch) | |
tree | e0be1fd0ee5c0ea35640b5f5772821dcc1b70d93 /var | |
parent | 8de453af5454cb37cd63b0e64dff4a6f73d6d875 (diff) | |
download | spack-2794e52ddd58aced74300ce5cd1a2ca30825dd90.tar.gz spack-2794e52ddd58aced74300ce5cd1a2ca30825dd90.tar.bz2 spack-2794e52ddd58aced74300ce5cd1a2ca30825dd90.tar.xz spack-2794e52ddd58aced74300ce5cd1a2ca30825dd90.zip |
QMCPACK Oct2019 fix buglets (#13069)
* Support different CMake build types correctly.
* LIBXML2 variables no longer used.
* Fix E501 as part of https://github.com/spack/spack/pull/13069
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/qmcpack/package.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py index 771c01d8c2..67041e455a 100644 --- a/var/spack/repos/builtin/packages/qmcpack/package.py +++ b/var/spack/repos/builtin/packages/qmcpack/package.py @@ -33,7 +33,9 @@ class Qmcpack(CMakePackage, CudaPackage): version('3.1.0', tag='v3.1.0') # These defaults match those in the QMCPACK manual - variant('debug', default=False, description='Build debug version') + variant('build_type', default='Release', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo')) variant('mpi', default=True, description='Build with MPI support') variant('phdf5', default=True, description='Build with parallel collective I/O') variant('complex', default=False, @@ -184,10 +186,14 @@ class Qmcpack(CMakePackage, CudaPackage): # Currently FFTW_HOME and LIBXML2_HOME are used by CMake. # Any CMake warnings about other variables are benign. - xml2_prefix = spec['libxml2'].prefix - args.append('-DLIBXML2_HOME={0}'.format(xml2_prefix)) - args.append('-DLibxml2_INCLUDE_DIRS={0}'.format(xml2_prefix.include)) - args.append('-DLibxml2_LIBRARY_DIRS={0}'.format(xml2_prefix.lib)) + # Starting with QMCPACK 3.8.0, CMake uses the builtin find(libxml2) + # function + if spec.satisfies('@:3.7.0'): + xml2_prefix = spec['libxml2'].prefix + args.append('-DLIBXML2_HOME={0}'.format(xml2_prefix)) + args.append( + '-DLibxml2_INCLUDE_DIRS={0}'.format(xml2_prefix.include)) + args.append('-DLibxml2_LIBRARY_DIRS={0}'.format(xml2_prefix.lib)) if '^fftw@3:' in spec: fftw_prefix = spec['fftw'].prefix |