Updating yaml-cpp from Package to CMakePackage. (#2457)
This commit is contained in:
parent
84dc0b5b83
commit
946605a4c9
1 changed files with 11 additions and 9 deletions
|
@ -25,7 +25,7 @@
|
|||
from spack import *
|
||||
|
||||
|
||||
class YamlCpp(Package):
|
||||
class YamlCpp(CMakePackage):
|
||||
"""A YAML parser and emitter in C++"""
|
||||
|
||||
homepage = "https://github.com/jbeder/yaml-cpp"
|
||||
|
@ -39,11 +39,13 @@ class YamlCpp(Package):
|
|||
|
||||
depends_on('cmake', type='build')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('spack-build', create=True):
|
||||
args = std_cmake_args
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
options = []
|
||||
|
||||
if '+fpic' in spec:
|
||||
args += ['-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true']
|
||||
cmake('..', *args)
|
||||
make()
|
||||
make("install")
|
||||
options.extend([
|
||||
'-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true'
|
||||
])
|
||||
|
||||
return options
|
||||
|
|
Loading…
Reference in a new issue