Add universal build_type variant to CMakePackage (#4797)

* Add universal build_type variant to CMakePackage
* Override build_type in some packages with different possible values
* Remove reference to no longer existent debug variant
* Update CBTF packages with new build_type variant
* Keep note on build size of LLVM
This commit is contained in:
Adam J. Stewart
2017-07-25 18:34:43 -05:00
committed by Todd Gamblin
parent 4b996e9f49
commit 07aec4366f
46 changed files with 68 additions and 319 deletions

View File

@@ -55,6 +55,9 @@ class Symengine(CMakePackage):
description='Enable thread safety option')
variant('shared', default=True,
description='Enables the build of shared libraries')
variant('build_type', default='Release',
description='The build type to build',
values=('Debug', 'Release'))
# NOTE: mpir is a drop-in replacement for gmp
# NOTE: [mpc,mpfr,flint,piranha] could also be built against mpir
@@ -66,10 +69,6 @@ class Symengine(CMakePackage):
depends_on('flint', when='+flint~boostmp')
depends_on('piranha', when='+piranha~flint~boostmp')
def build_type(self):
# CMAKE_BUILD_TYPE should be Debug | Release
return 'Release'
def cmake_args(self):
spec = self.spec
options = []
@@ -77,7 +76,6 @@ def cmake_args(self):
# See https://github.com/symengine/symengine/blob/master/README.md
# for build options
options.extend([
'-DCMAKE_BUILD_TYPE=Release',
'-DWITH_SYMENGINE_RCP:BOOL=ON',
'-DWITH_SYMENGINE_THREAD_SAFE:BOOL=%s' % (
'ON' if ('+thread_safe' or '+openmp') in spec else 'OFF'),