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

@@ -43,10 +43,10 @@ class Llvm(CMakePackage):
version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005',
url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz')
variant('debug', default=False,
description="Build a debug version of LLVM, this increases "
"binary size by an order of magnitude, make sure you have "
"20-30gb of space available to build this")
# NOTE: The debug version of LLVM is an order of magnitude larger than
# the release version, and may take up 20-30 GB of space. If you want
# to save space, build with `build_type=Release`.
variant('clang', default=True,
description="Build the LLVM C/C++/Objective-C compiler frontend")
variant('lldb', default=True, description="Build the LLVM debugger")
@@ -327,12 +327,6 @@ class Llvm(CMakePackage):
def setup_environment(self, spack_env, run_env):
spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)
def build_type(self):
if '+debug' in self.spec:
return 'RelWithDebInfo'
else:
return 'Release'
def cmake_args(self):
spec = self.spec