diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-20 15:34:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-20 15:34:16 +0200 |
commit | 4c44c914d898af53152addad5530504548175e85 (patch) | |
tree | f319c76b681e44874f887bfb5d085d59aa1e662d /build/scope | |
parent | a82cdb8fd9ba02034d296769772cdf81244da66a (diff) |
Merge config.cxx.* variables into cxx.* when loading cxx module
Diffstat (limited to 'build/scope')
-rw-r--r-- | build/scope | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/build/scope b/build/scope index e3c8776..2824aeb 100644 --- a/build/scope +++ b/build/scope @@ -108,15 +108,21 @@ namespace build // std::unordered_set<path_type> buildfiles; - // A map of buildfiles to trigger functions that are executed when - // such files are sourced. The path must be absolute and normalized. + // A map of absolute and normalized buildfile paths to trigger + // functions that are executed when such files are sourced. The + // trigger is called twice: the first time before sourcing the + // file (pre is true) and the second time -- after (pre is false). // - // The passed path is the buildfile. If the returned value is true, - // then the file is sourced. If false -- the file is ignored. Note - // that currently triggers can only be registered on the project's - // root scope. + // The passed path is the buildfile, which can be altered by the + // trigger in the pre call, if desired. If the returned value is + // true, then the file is sourced. If false -- the file is ignored + // (and no post call is made). The return value is ignored in the + // post call. // - using trigger_type = std::function<bool (scope&, const path_type&)>; + // Note that currently triggers can only be registered on the + // project's root scope. + // + using trigger_type = std::function<bool (bool pre, scope&, path_type&)>; std::unordered_map<path_type, trigger_type> triggers; private: |