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