aboutsummaryrefslogtreecommitdiff
path: root/build/config/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-02 11:37:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-02 11:37:15 +0200
commit9891b20350021ce41a950645dd76df20a45c92cc (patch)
tree0cd27041b0c3413e17b9319ae99e87c5e745b1ff /build/config/utility
parent74212589a797ca75e55f92a522e198915c0dbaf6 (diff)
Implement optional module loading
The syntax is: using? cli Now each module use results in two bool variables: <module>.loaded and <module>.configured. Also implement variable visibility (the above two variables are limited to project).
Diffstat (limited to 'build/config/utility')
-rw-r--r--build/config/utility7
1 files changed, 3 insertions, 4 deletions
diff --git a/build/config/utility b/build/config/utility
index 9a5dc5e..ece7a88 100644
--- a/build/config/utility
+++ b/build/config/utility
@@ -42,8 +42,7 @@ namespace build
const T& default_value,
bool override = false)
{
- return required (
- root, variable_pool.find (name), default_value, override);
+ return required (root, var_pool.find (name), default_value, override);
}
inline std::pair<std::reference_wrapper<const value>, bool>
@@ -68,7 +67,7 @@ namespace build
inline const value&
optional (scope& root, const std::string& var)
{
- return optional (root, variable_pool.find (var));
+ return optional (root, var_pool.find (var));
}
// As above but assumes the value is dir_path and makes it
@@ -81,7 +80,7 @@ namespace build
inline const value&
optional_absolute (scope& root, const std::string& var)
{
- return optional_absolute (root, variable_pool.find (var));
+ return optional_absolute (root, var_pool.find (var));
}
// Check whether there are any variables specified from the