aboutsummaryrefslogtreecommitdiff
path: root/build2/file.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/file.ixx')
-rw-r--r--build2/file.ixx17
1 files changed, 17 insertions, 0 deletions
diff --git a/build2/file.ixx b/build2/file.ixx
index e12654c..be43857 100644
--- a/build2/file.ixx
+++ b/build2/file.ixx
@@ -9,4 +9,21 @@ namespace build2
{
return source_once (root, base, bf, base);
}
+
+ target*
+ import (const prerequisite_key&, bool existing);
+
+ inline target&
+ import (const prerequisite_key& pk)
+ {
+ assert (phase == run_phase::search_match);
+ return *import (pk, false);
+ }
+
+ inline const target*
+ import_existing (const prerequisite_key& pk)
+ {
+ assert (phase == run_phase::search_match || phase == run_phase::execute);
+ return import (pk, true);
+ }
}