// file : build2/target.txx -*- C++ -*- // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #include #include // extension_pool #include #include namespace build2 { // prerequisite_members_range // template void prerequisite_members_range::iterator:: switch_mode () { // A group could be empty, so we may have to iterate. // do { g_ = resolve_group_members (r_->a_, search (*i_)); assert (g_.members != nullptr); // Group could not be resolved. if (g_.count != 0) // Skip empty see through groups. { j_ = 1; // Start from the first group member. break; } } while (++i_ != r_->e_ && i_->get ().type.see_through); } // // template const string* target_extension_fix (const target_key&, scope&) { return &extension_pool.find (ext); } template const string* target_extension_var (const target_key& tk, scope& s) { // Include target type/pattern-specific variables. // if (auto l = s.find (var, tk)) { // Help the user here and strip leading '.' from the extension. // const string& e (cast (l)); return &extension_pool.find ( !e.empty () && e.front () == '.' ? string (e, 1) : e); } return def != nullptr ? &extension_pool.find (def) : nullptr; } }