abyss.7
abyss.7

Reputation: 14462

How to avoid library multiple checks in waf?

I'm trying to use different modules (with independent wscript files) across several projects, so that modules can be developed in a one place and can be checked out in many places.

I have a project's top wscript like this:

def configure(cfg):
  ...
  cfg.recurse('a')
  cfg.recurse('b')
  ...

And wscript's in modules from subdirs './a' and './b':

def configure(cfg):
  ...
  cfg.check_cxx(lib='z')
  ...

So, is there a way to tell waf to check libz only once?

Upvotes: 2

Views: 336

Answers (1)

cJ Zougloub
cJ Zougloub

Reputation: 1494

Nope, there isn't something built-in to do that. I can just suggest workarounds : - get something you know will be defined by the check_cxx if "LIB_Z" not in cfg.env: cfg.check_cxx(...) - or add make check_cxx define something if cfg.get_define("HAVE_ZLIB") is not None: cfg.check_cxx(lib='z', define_name="HAVE_ZLIB")

I doubt any caching can be performed in methods such as check_cxx, they can do a lot of things and are controlled by keywords...

Upvotes: 0

Related Questions