From 68f96f9213e849d0d7c4cedf3edeaec99743ee27 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Aug 2015 09:51:15 +0200 Subject: New variable architecture --- build/install/utility | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'build/install/utility') diff --git a/build/install/utility b/build/install/utility index 5c703fc..9bc41f1 100644 --- a/build/install/utility +++ b/build/install/utility @@ -5,7 +5,11 @@ #ifndef BUILD_INSTALL_UTILITY #define BUILD_INSTALL_UTILITY +#include +#include + #include +#include namespace build { @@ -15,20 +19,20 @@ namespace build // template inline void - path (scope& s, const char* v) + path (scope& s, dir_path d) { - auto p (s.target_vars[T::static_type]["*"].assign ("install")); - if (p.second) // Already set by the user? - p.first = v; + auto r (s.target_vars[T::static_type]["*"].assign ("install")); + if (r.second) // Already set by the user? + r.first.get () = std::move (d); } template inline void - mode (scope& s, const char* v) + mode (scope& s, std::string m) { - auto m (s.target_vars[T::static_type]["*"].assign ("install.mode")); - if (m.second) // Already set by the user? - m.first = v; + auto r (s.target_vars[T::static_type]["*"].assign ("install.mode")); + if (r.second) // Already set by the user? + r.first.get () = std::move (m); } } } -- cgit v1.1