tree: use Spack's compiler and fix installation on macOS (#2293)
This commit is contained in:
parent
26ed2327ae
commit
7cb756cdbb
@ -23,6 +23,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class Tree(Package):
|
class Tree(Package):
|
||||||
@ -39,8 +40,24 @@ class Tree(Package):
|
|||||||
version('1.7.0', 'abe3e03e469c542d8e157cdd93f4d8a6')
|
version('1.7.0', 'abe3e03e469c542d8e157cdd93f4d8a6')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
filter_file(r'^prefix =.*', 'prefix = %s' % prefix, 'Makefile')
|
objs = [
|
||||||
filter_file(r'^CFLAGS', '# use spack settings instead... CFLAGS',
|
'tree.o',
|
||||||
'Makefile')
|
'unix.o',
|
||||||
make()
|
'html.o',
|
||||||
make('install')
|
'xml.o',
|
||||||
|
'json.o',
|
||||||
|
'hash.o',
|
||||||
|
'color.o'
|
||||||
|
]
|
||||||
|
if (sys.platform == 'darwin'):
|
||||||
|
objs.append('strverscmp.o')
|
||||||
|
|
||||||
|
args = [
|
||||||
|
'prefix=%s' % prefix,
|
||||||
|
'CC=%s' % spack_cc,
|
||||||
|
'CFLAGS=',
|
||||||
|
'OBJS=%s' % ' '.join(objs),
|
||||||
|
'install'
|
||||||
|
]
|
||||||
|
|
||||||
|
make(*args)
|
||||||
|
Loading…
Reference in New Issue
Block a user