Update buildsystem tut (#9795)
* Update Makefile to use property methods ("build_targets"/"install_targets") to demonstrate their usage * Fix highlighting * Change cbench example to ESMF: CBench package file was changed and no longer uses the example shown in the old docs
This commit is contained in:

committed by
Peter Scheibel

parent
d366e642e4
commit
7d98c73e40
@@ -24,11 +24,13 @@ def edit(self, spec, prefix):
|
||||
makefile.filter('CC= .*', 'CC = ' + env['CC'])
|
||||
makefile.filter('CXX = .*', 'CXX = ' + env['CXX'])
|
||||
|
||||
def build(self, spec, prefix):
|
||||
@property
|
||||
def build_targets(self):
|
||||
if "+tbb" in spec:
|
||||
make()
|
||||
return []
|
||||
else:
|
||||
make("NO_TBB=1")
|
||||
return ["NO_TBB=1"]
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make('prefix={0}'.format(self.prefix), 'install')
|
||||
@property
|
||||
def install_targets(self):
|
||||
return ['prefix={0}'.format(self.prefix), 'install']
|
||||
|
Reference in New Issue
Block a user