diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-24 12:29:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-24 12:29:20 +0200 |
commit | 2a0f9e035f673f1ee387924501a31990de37f18d (patch) | |
tree | b8e55ab74bc88b788e99d8649219b931b80432d5 /build/file.cxx | |
parent | 4c44c914d898af53152addad5530504548175e85 (diff) |
Implement lib/liba/libso{} target group, shared/static library build
Diffstat (limited to 'build/file.cxx')
-rw-r--r-- | build/file.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/build/file.cxx b/build/file.cxx index 72b8d37..c130663 100644 --- a/build/file.cxx +++ b/build/file.cxx @@ -11,6 +11,8 @@ #include <build/filesystem> #include <build/diagnostics> +#include <build/config/utility> + using namespace std; namespace build @@ -257,20 +259,14 @@ namespace build // Figure out this project's out_root. // - const variable& var (variable_pool.find ("config." + n.value)); - auto val (iroot[var]); + string var ("config." + n.value); + const dir_path& out_root ( + config::required (iroot, var.c_str (), dir_path ()).first); - if (val) - { - if (val.belongs (*global_scope)) - iroot.assign (var) = val; // Copy into root scope. - } - else + if (out_root.empty ()) fail (l) << "unable to find out_root for imported " << n << info << "consider explicitly configuring its out_root via the " - << var.name << " command line variable"; - - const dir_path& out_root (val.as<const dir_path&> ()); + << var << " command line variable"; // Bootstrap the imported root scope. This is pretty similar to // what we do in main() except that here we don't try to guess |