Skip to content

Commit 667fb2b

Browse files
committed
all: honor path_list kw-arg, propagate to find_xyz
1 parent 9127c26 commit 667fb2b

11 files changed

+26
-21
lines changed

find_clhep.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def find_clhep(ctx, **kwargs):
3838

3939
# find CLHEP
4040
clhep_cfg = "clhep-config"
41-
path_list = []
41+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4242
if getattr(ctx.options, 'with_clhep', None):
4343
topdir = ctx.options.with_clhep
4444
topdir = ctx.hwaf_subst_vars(topdir)

find_cmake.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ def find_cmake(ctx, **kwargs):
3939
pass
4040

4141

42-
path_list = []
42+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4343
if getattr(ctx.options, 'with_cmake', None):
4444
topdir = ctx.options.with_cmake
4545
topdir = ctx.hwaf_subst_vars(topdir)
4646
path_list.append(osp.join(topdir, "bin"))
4747
pass
48-
48+
kwargs['path_list'] = path_list
49+
4950
ctx.find_program(
5051
"cmake",
5152
var="CMAKE",
52-
path_list=path_list,
5353
**kwargs)
5454

5555
kwargs['mandatory'] = False

find_compiler.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def find_c_compiler(ctx, **kwargs):
6363
pass
6464

6565
# find CC
66-
path_list = []
66+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
6767
if getattr(ctx.options, 'with_hwaf_toolchain', None):
6868
topdir = ctx.options.with_hwaf_toolchain
6969
topdir = ctx.hwaf_subst_vars(topdir)
@@ -130,7 +130,7 @@ def find_cxx_compiler(ctx, **kwargs):
130130
pass
131131

132132
# find CXX
133-
path_list = []
133+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
134134
if getattr(ctx.options, 'with_hwaf_toolchain', None):
135135
topdir = ctx.options.with_hwaf_toolchain
136136
topdir = ctx.hwaf_subst_vars(topdir)
@@ -197,7 +197,7 @@ def find_fortran_compiler(ctx, **kwargs):
197197
pass
198198

199199
# find FC
200-
path_list = []
200+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
201201
if getattr(ctx.options, 'with_hwaf_toolchain', None):
202202
topdir = ctx.options.with_hwaf_toolchain
203203
topdir = ctx.hwaf_subst_vars(topdir)
@@ -271,13 +271,17 @@ def find_toolchain(ctx, **kw):
271271
pass
272272

273273
# C compiler
274-
ctx.find_c_compiler(**kw)
274+
c_kw = dict(kw)
275+
ctx.find_c_compiler(**c_kw)
275276

276277
# C++ compiler
277-
ctx.find_cxx_compiler(**kw)
278+
cxx_kw = dict(kw)
279+
ctx.find_cxx_compiler(**cxx_kw)
278280

279281
# Fortran compiler
280-
ctx.find_fortran_compiler(mandatory=False, **kw)
282+
fc_kw = dict(kw)
283+
fc_kw['mandatory'] = fc_kw.get('mandatory', False)
284+
ctx.find_fortran_compiler(**fc_kw)
281285

282286
ctx.env.HWAF_FOUND_TOOLCHAIN = 1
283287
return

find_gccxml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def find_gccxml(ctx, **kwargs):
4040

4141
# find gccxml
4242
gccxml_bin = "gccxml"
43-
path_list = []
43+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4444
if getattr(ctx.options, 'with_gccxml', None):
4545
topdir = ctx.options.with_gccxml
4646
topdir = ctx.hwaf_subst_vars(topdir)

find_libxml2.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,17 @@ def find_libxml2(ctx, **kwargs):
3838

3939
# find LibXML2
4040
xml_cfg = "xml2-config"
41-
path_list = []
41+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4242
if getattr(ctx.options, 'with_libxml2', None):
4343
topdir = ctx.options.with_libxml2
4444
topdir = ctx.hwaf_subst_vars(topdir)
4545
path_list.append(osp.abspath(osp.join(topdir, "bin")))
4646
pass
47-
47+
kwargs['path_list'] = path_list
4848

4949
ctx.find_program(
5050
xml_cfg,
5151
var='LIBXML2-CONFIG',
52-
path_list=path_list,
5352
**kwargs)
5453
#xml_cfg = ctx.env['LIBXML2-CONFIG']
5554

find_python.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def find_python(ctx, **kwargs):
7979
pyversion = kwargs.get("version", (2,6))
8080

8181
# find python
82-
path_list = []
82+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
8383
if getattr(ctx.options, 'with_python', None):
8484
topdir = ctx.options.with_python
8585
topdir = ctx.hwaf_subst_vars(topdir)

find_root.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def find_root(ctx, **kwargs):
6262

6363
# find root
6464
root_cfg = "root-config"
65-
path_list = []
65+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
6666
if getattr(ctx.options, 'with_root', None):
6767
topdir = ctx.options.with_root
6868
topdir = ctx.hwaf_subst_vars(topdir)

find_sqlite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def find_sqlite(ctx, **kwargs):
3737
ctx.fatal('load a C++ compiler first')
3838
pass
3939

40-
path_list = []
40+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4141
if getattr(ctx.options, 'with_sqlite', None):
4242
topdir = ctx.options.with_sqlite
4343
topdir = ctx.hwaf_subst_vars(topdir)

find_tcmalloc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def find_tcmalloc(ctx, **kwargs):
3737
ctx.fatal('load a C++ compiler first')
3838
pass
3939

40-
path_list = []
40+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4141
if getattr(ctx.options, 'with_tcmalloc', None):
4242
path_list.append(
4343
osp.join(ctx.options.with_tcmalloc, "bin")

find_valgrind.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def find_valgrind(ctx, **kwargs):
3737
ctx.fatal('load a C++ compiler first')
3838
pass
3939

40-
path_list = []
40+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
4141
if getattr(ctx.options, 'with_valgrind', None):
4242
topdir = ctx.options.with_valgrind
4343
topdir = ctx.hwaf_subst_vars(topdir)

find_xrootd.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ def find_xrootd(ctx, **kwargs):
4949
libdir = osp.join(ctx.env.XROOTD_HOME, 'lib')
5050
incdir = osp.join(ctx.env.XROOTD_HOME, 'include')
5151

52+
path_list = waflib.Utils.to_list(kwargs.get('path_list', []))
53+
path_list.append(bindir)
54+
kwargs['path_list'] = path_list
55+
5256
ctx.define_uselib(
5357
name="xrootd-posix",
5458
libpath=libdir,
@@ -76,14 +80,12 @@ def find_xrootd(ctx, **kwargs):
7680
ctx.find_program(
7781
"xrdcp",
7882
var="XRDCP-BIN",
79-
path_list=bindir,
8083
**kwargs)
8184

8285
kwargs['mandatory'] = False
8386
ctx.find_program(
8487
"xrootd",
8588
var="XROOTD-BIN",
86-
path_list=bindir,
8789
**kwargs)
8890

8991
# -- check everything is kosher...

0 commit comments

Comments
 (0)