add assimp package. link against it in dealii (#5463)
This commit is contained in:
parent
99cefcc955
commit
330211468a
2 changed files with 56 additions and 0 deletions
41
var/spack/repos/builtin/packages/assimp/package.py
Normal file
41
var/spack/repos/builtin/packages/assimp/package.py
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
|
||||||
|
# Produced at the Lawrence Livermore National Laboratory.
|
||||||
|
#
|
||||||
|
# This file is part of Spack.
|
||||||
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||||
|
# LLNL-CODE-647188
|
||||||
|
#
|
||||||
|
# For details, see https://github.com/llnl/spack
|
||||||
|
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License (as
|
||||||
|
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||||
|
# conditions of the GNU Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
##############################################################################
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
|
class Assimp(CMakePackage):
|
||||||
|
"""Open Asset Import Library (Assimp) is a portable Open Source library to
|
||||||
|
import various well-known 3D model formats in a uniform manner."""
|
||||||
|
|
||||||
|
homepage = "https://www.assimp.org"
|
||||||
|
url = "https://github.com/assimp/assimp/archive/v3.3.1.tar.gz"
|
||||||
|
|
||||||
|
version('4.0.1', '23a6301c728a413aafbfa1cca19ba91f')
|
||||||
|
|
||||||
|
depends_on('boost')
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
args = ['-DASSIMP_BUILD_TESTS=OFF']
|
||||||
|
return args
|
|
@ -49,6 +49,8 @@ class Dealii(CMakePackage):
|
||||||
version('develop', git='https://github.com/dealii/dealii.git', branch='master')
|
version('develop', git='https://github.com/dealii/dealii.git', branch='master')
|
||||||
|
|
||||||
variant('mpi', default=True, description='Compile with MPI')
|
variant('mpi', default=True, description='Compile with MPI')
|
||||||
|
variant('assimp', default=False,
|
||||||
|
description='Compile with Assimp')
|
||||||
variant('arpack', default=True,
|
variant('arpack', default=True,
|
||||||
description='Compile with Arpack and PArpack (only with MPI)')
|
description='Compile with Arpack and PArpack (only with MPI)')
|
||||||
variant('adol-c', default=False,
|
variant('adol-c', default=False,
|
||||||
|
@ -121,6 +123,7 @@ class Dealii(CMakePackage):
|
||||||
depends_on("mpi", when="+mpi")
|
depends_on("mpi", when="+mpi")
|
||||||
depends_on("adol-c@2.6.4:", when='@9.0:+adol-c')
|
depends_on("adol-c@2.6.4:", when='@9.0:+adol-c')
|
||||||
depends_on("arpack-ng+mpi", when='+arpack+mpi')
|
depends_on("arpack-ng+mpi", when='+arpack+mpi')
|
||||||
|
depends_on("assimp", when='@9.0:+assimp')
|
||||||
depends_on("doxygen+graphviz", when='+doc')
|
depends_on("doxygen+graphviz", when='+doc')
|
||||||
depends_on("graphviz", when='+doc')
|
depends_on("graphviz", when='+doc')
|
||||||
depends_on("gsl", when='@8.5.0:+gsl')
|
depends_on("gsl", when='@8.5.0:+gsl')
|
||||||
|
@ -148,6 +151,7 @@ class Dealii(CMakePackage):
|
||||||
depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre", when="+trilinos+mpi+int64")
|
depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre", when="+trilinos+mpi+int64")
|
||||||
|
|
||||||
# check that the combination of variants makes sense
|
# check that the combination of variants makes sense
|
||||||
|
conflicts('+assimp', when='@:8.5.1')
|
||||||
conflicts('+nanoflann', when='@:8.5.1')
|
conflicts('+nanoflann', when='@:8.5.1')
|
||||||
conflicts('+sundials', when='@:8.5.1')
|
conflicts('+sundials', when='@:8.5.1')
|
||||||
conflicts('+adol-c', when='@:8.5.1')
|
conflicts('+adol-c', when='@:8.5.1')
|
||||||
|
@ -286,6 +290,17 @@ def cmake_args(self):
|
||||||
'-DDEAL_II_WITH_ARPACK=OFF'
|
'-DDEAL_II_WITH_ARPACK=OFF'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Assimp
|
||||||
|
if '+assimp' in spec:
|
||||||
|
options.extend([
|
||||||
|
'-DEAL_II_WITH_ASSIMP=ON',
|
||||||
|
'-DASSIMP_DIR=%s' % spec['assimp'].prefix
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
options.extend([
|
||||||
|
'-DEAL_II_WITH_ASSIMP=OFF'
|
||||||
|
])
|
||||||
|
|
||||||
# since Netcdf is spread among two, need to do it by hand:
|
# since Netcdf is spread among two, need to do it by hand:
|
||||||
if '+netcdf' in spec and '+mpi' in spec:
|
if '+netcdf' in spec and '+mpi' in spec:
|
||||||
# take care of lib64 vs lib installed lib locations:
|
# take care of lib64 vs lib installed lib locations:
|
||||||
|
|
Loading…
Reference in a new issue