From 8e9d9057940bc3ed092530c6d2e6835e84ab0574 Mon Sep 17 00:00:00 2001 From: Andrey Prokopenko Date: Thu, 25 May 2017 10:41:11 -0400 Subject: [PATCH] Trilinos: add DTK external package (#4304) * trilinos: add DTK external package * Making +dtk and ~tpetra conflict --- .../builtin/packages/trilinos/package.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0d90ae4e1e6..66dc4f0e642 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -87,14 +87,23 @@ class Trilinos(CMakePackage): description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') - variant('boost', default=True, description='Compile with Boost') - variant('tpetra', default=True, description='Compile with Tpetra') - variant('exodus', default=False, description='Compile with Exodus from SEACAS') + variant('boost', default=True, description='Compile with Boost') + variant('tpetra', default=True, description='Compile with Tpetra') + variant('exodus', default=False, description='Compile with Exodus from SEACAS') + + variant('dtk', default=False, description='Enable DataTransferKit') + resource(name='dtk', + git='https://github.com/ornl-cees/DataTransferKit', + tag='master', + placement='DataTransferKit', + when='+dtk') + conflicts('+dtk', when='~tpetra') # Everything should be compiled with -fpic depends_on('blas') depends_on('lapack') depends_on('boost', when='+boost') + depends_on('boost', when='+dtk') depends_on('matio') depends_on('glm') depends_on('metis@5:', when='+metis') @@ -386,6 +395,13 @@ def cmake_args(self): '-DTrilinos_ENABLE_STK=OFF' ]) + if '+dtk' in spec: + options.extend([ + '-DTrilinos_EXTRA_REPOSITORIES:STRING=DataTransferKit', + '-DTpetra_INST_INT_UNSIGNED_LONG:BOOL=ON', + '-DTrilinos_ENABLE_DataTransferKit:BOOL=ON' + ]) + # exodus if '+exodus' in spec: options.extend([