aboutsummaryrefslogtreecommitdiff
path: root/build2/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-06-16 14:57:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-06-16 14:57:47 +0200
commitf3e193b2651b2589daecaf181b96c5622acc51e9 (patch)
tree2391980d95895d25e71d70a3322b179b13d2867b /build2/utility.cxx
parenta2a9146e9cb905782de92e9ef04c1fd7745f1cff (diff)
Clean up module-related diagnostics
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r--build2/utility.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/build2/utility.cxx b/build2/utility.cxx
index 2b3f785..f2d9155 100644
--- a/build2/utility.cxx
+++ b/build2/utility.cxx
@@ -10,6 +10,7 @@
#include <cstdlib> // strtol()
#include <iostream> // cerr
+#include <build2/target.hxx>
#include <build2/variable.hxx>
#include <build2/diagnostics.hxx>
@@ -125,6 +126,14 @@ namespace build2
dir_path home;
const dir_path* relative_base = &work;
+ path
+ relative (const path_target& t)
+ {
+ const path& p (t.path ());
+ assert (!p.empty ());
+ return relative (p);
+ }
+
string
diag_relative (const path& p, bool cur)
{