aboutsummaryrefslogtreecommitdiff
path: root/build/install/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-24 09:51:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-24 14:52:43 +0200
commit68f96f9213e849d0d7c4cedf3edeaec99743ee27 (patch)
tree271913d74c906971cac555319f5e14d0c66e0c16 /build/install/utility
parent0d5234f4aefd3cc5b5948cc1b9dd009e50046f5e (diff)
New variable architecture
Diffstat (limited to 'build/install/utility')
-rw-r--r--build/install/utility20
1 files changed, 12 insertions, 8 deletions
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 <string>
+#include <utility>
+
#include <build/scope>
+#include <build/types>
namespace build
{
@@ -15,20 +19,20 @@ namespace build
//
template <typename T>
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 <typename T>
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);
}
}
}