aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-22 12:55:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-22 12:55:21 +0200
commit48e2e4140b8e5aacdfd107a1215f21c9632c81c8 (patch)
tree7897b62300a433533318be5de14f9ba0745da4d8 /build2/variable.ixx
parent3b6f882ce0dae1d80a330b36a63fbe65026a3278 (diff)
Cache process_path, use fallback search directory for binutils
Diffstat (limited to 'build2/variable.ixx')
-rw-r--r--build2/variable.ixx29
1 files changed, 29 insertions, 0 deletions
diff --git a/build2/variable.ixx b/build2/variable.ixx
index 4b699a6..393a796 100644
--- a/build2/variable.ixx
+++ b/build2/variable.ixx
@@ -476,6 +476,35 @@ namespace build2
return l.compare (r);
}
+ // process_path value
+ //
+ inline void value_traits<process_path>::
+ assign (value& v, process_path&& x)
+ {
+ // Convert the value to its "self-sufficient" form.
+ //
+ if (x.recall.empty ())
+ x.recall = path (x.initial);
+
+ x.initial = x.recall.string ().c_str ();
+
+ if (v)
+ v.as<process_path> () = move (x);
+ else
+ new (&v.data_) process_path (move (x));
+ }
+
+ inline int value_traits<process_path>::
+ compare (const process_path& x, const process_path& y)
+ {
+ int r (x.recall.compare (y.recall));
+
+ if (r == 0)
+ r = x.effect.compare (y.effect);
+
+ return r;
+ }
+
// vector<T> value
//
template <typename T>