aboutsummaryrefslogtreecommitdiff
path: root/build2/target
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-28 08:33:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-28 08:33:42 +0200
commit593fd960891027b97567b2622ed4b6c16070ab36 (patch)
treef4cb383f8606fde6adff7ac9f90a20cc9ad59840 /build2/target
parentac402e1fef2c13b5860ca5223d764bbfdfb867e3 (diff)
Implement support for pre-processing version headers (or other files)
Also implement the build system version check.
Diffstat (limited to 'build2/target')
-rw-r--r--build2/target13
1 files changed, 13 insertions, 0 deletions
diff --git a/build2/target b/build2/target
index 1a1fd8d..4316ff6 100644
--- a/build2/target
+++ b/build2/target
@@ -824,6 +824,7 @@ namespace build2
//
struct prerequisite_member
{
+ using scope_type = build2::scope;
using target_type = build2::target;
using prerequisite_type = build2::prerequisite;
using target_type_type = build2::target_type;
@@ -866,6 +867,12 @@ namespace build2
return target != nullptr ? target->name : prerequisite.name;
}
+ const dir_path&
+ dir () const
+ {
+ return target != nullptr ? target->dir : prerequisite.dir;
+ }
+
const optional<string>&
proj () const
{
@@ -876,6 +883,12 @@ namespace build2
: prerequisite.proj;
}
+ const scope_type&
+ scope () const
+ {
+ return target != nullptr ? target->base_scope () : prerequisite.scope;
+ }
+
const target_type&
search (const target_type& t) const
{