assimp: fix compile issues with intel compilers on knl/linux [a depen… (#9191)

* assimp: fix compile issues with intel compilers on knl/linux [a dependency for dealii]

Fixes issue #9189

* assimp: add variant 'shared' with default value 'True'
This commit is contained in:
Satish Balay 2018-09-08 16:18:37 -05:00 committed by GitHub
parent ffca064778
commit 8afc630e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,8 +34,21 @@ class Assimp(CMakePackage):
version('4.0.1', '23a6301c728a413aafbfa1cca19ba91f')
variant('shared', default=True,
description='Enables the build of shared libraries')
depends_on('boost')
def cmake_args(self):
args = ['-DASSIMP_BUILD_TESTS=OFF']
args = [
'-DASSIMP_BUILD_TESTS=OFF',
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in self.spec else 'OFF'),
]
return args
def flag_handler(self, name, flags):
flags = list(flags)
if name == 'cxxflags':
flags.append(self.compiler.cxx11_flag)
return (None, None, flags)