aboutsummaryrefslogtreecommitdiff
path: root/build/variable
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-29 12:20:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-29 12:20:53 +0200
commit729b56300c441a0d63c7d2013eb5a881211d352b (patch)
treed363c5f282b910e1f014161e24c6dfc6a5fcba40 /build/variable
parent1cf1603cae3064aff734f52d23c06098e81a8111 (diff)
Initial support for target type/pattern-specific variables
Diffstat (limited to 'build/variable')
-rw-r--r--build/variable10
1 files changed, 9 insertions, 1 deletions
diff --git a/build/variable b/build/variable
index 809e7d2..998a853 100644
--- a/build/variable
+++ b/build/variable
@@ -5,18 +5,20 @@
#ifndef BUILD_VARIABLE
#define BUILD_VARIABLE
+#include <map>
#include <string>
#include <memory> // unique_ptr
#include <cstddef> // nullptr_t
#include <utility> // move(), pair, make_pair()
#include <cassert>
-#include <functional> // hash
+#include <functional> // hash, reference_wrapper
#include <typeindex>
#include <unordered_set>
#include <butl/prefix-map>
#include <build/types>
+#include <build/target-type>
namespace build
{
@@ -340,6 +342,12 @@ namespace build
return find_prefix (variable_pool.find (ns));
}
};
+
+ // Target type/pattern-specific variables.
+ //
+ using variable_pattern_map = std::map<std::string, variable_map>;
+ using variable_type_map = std::map<std::reference_wrapper<const target_type>,
+ variable_pattern_map>;
}
#include <build/variable.ixx>