diff options
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r-- | libbuild2/target.ixx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index 3842c37..5f53f3d 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -30,6 +30,12 @@ namespace build2 e != nullptr ? optional<string> (*e) : nullopt}; } + inline names target:: + as_name () const + { + return key ().as_name (); + } + inline auto target:: prerequisites () const -> const prerequisites_type& { @@ -558,4 +564,26 @@ namespace build2 { return mtime_target::load_mtime (path ()); } + + // exe + // + inline auto exe:: + process_path () const -> process_path_type + { + // It's unfortunate we have to return by value but hopefully the + // compiler will see through it. Note also that returning empty + // process path if path is empty. + // + return process_path_.empty () + ? process_path_type (path ().string ().c_str (), + path_type (), + path_type ()) + : process_path_type (process_path_, false /* init */); + } + + inline void exe:: + process_path (process_path_type p) + { + process_path_ = move (p); + } } |