summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2017-03-16 12:48:39 -0400
committerAdam J. Stewart <ajstewart426@gmail.com>2017-03-16 11:48:39 -0500
commit83fe65e121d3537229b01dbd21975e34f08f79ac (patch)
tree20e9fa66f458a51f869b2466a77cf71e96b2c341
parent53ca628d8bce5050ff87dca48a0c4a8c6da1fd5f (diff)
downloadspack-83fe65e121d3537229b01dbd21975e34f08f79ac.tar.gz
spack-83fe65e121d3537229b01dbd21975e34f08f79ac.tar.bz2
spack-83fe65e121d3537229b01dbd21975e34f08f79ac.tar.xz
spack-83fe65e121d3537229b01dbd21975e34f08f79ac.zip
hwloc: Add missing dependencies (#3457)
* hwloc: Add missing dependencies - add several missing dependencies - add variants for various features - add new version 1.11.6 * hwloc: Add descriptions to variants
-rw-r--r--var/spack/repos/builtin/packages/hwloc/package.py27
1 files changed, 22 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py
index b5f6bf9951..4d027344e9 100644
--- a/var/spack/repos/builtin/packages/hwloc/package.py
+++ b/var/spack/repos/builtin/packages/hwloc/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
class Hwloc(AutotoolsPackage):
@@ -42,6 +43,7 @@ class Hwloc(AutotoolsPackage):
list_url = "http://www.open-mpi.org/software/hwloc/"
list_depth = 3
+ version('1.11.6', 'b4e95eadd2fbdb6d40bbd96be6f03c84')
version('1.11.5', '8f5fe6a9be2eb478409ad5e640b2d3ba')
version('1.11.4', 'b6f23eb59074fd09fdd84905d50b103d')
version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f')
@@ -49,13 +51,28 @@ class Hwloc(AutotoolsPackage):
version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc')
version('1.9', '1f9f9155682fe8946a97c08896109508')
- depends_on('libpciaccess')
+ variant('cuda', default=False, description="Support CUDA devices")
+ variant('libxml2', default=True, description="Build with libxml2")
+ variant('pci', default=(sys.platform != 'darwin'),
+ description="Support analyzing devices on PCI bus")
+
+ depends_on('cuda', when='+cuda')
+ depends_on('libpciaccess', when='+pci')
+ depends_on('libxml2', when='+libxml2')
+ depends_on('pkg-config', type='build')
def url_for_version(self, version):
return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version)
def configure_args(self):
- # Disable OpenCL, since hwloc might pick up an OpenCL library
- # at build time that is then not found at run time
- # (Alternatively, we could require OpenCL as dependency.)
- return ["--disable-opencl"]
+ spec = self.spec
+ args = [
+ "--enable-cuda" if '+cuda' in spec else "--disable-cuda",
+ "--enable-libxml2" if '+libxml2' in spec else "--disable-libxml2",
+ "--enable-pci" if '+pci' in spec else "--disable-pci",
+ # Disable OpenCL, since hwloc might pick up an OpenCL
+ # library at build time that is then not found at run time
+ # (Alternatively, we could require OpenCL as dependency.)
+ "--disable-opencl",
+ ]
+ return args