aboutsummaryrefslogtreecommitdiff
path: root/build/install/utility
diff options
context:
space:
mode:
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);
}
}
}