aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-21 11:03:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-21 11:03:37 +0200
commita14daf38475a414e462708d9b0f4d651e5119b58 (patch)
treefa77c802d8bc7b16d91236c360853a164f13e761 /build2/variable.hxx
parente4c4d8d65ea675eaa56c85661ba42e112ab70f4b (diff)
Add support for target and prerequisite specific variable blocks
For example, now instead of: lib{foo}: cxx.loptions += -static lib{foo}: cxx.libs += -lpthread We can write: lib{foo}: { cxx.loptions += -static cxx.libs += -lpthread } The same works for prerequisites as well as target type/patterns. For example: exe{*.test}: { test = true install = false }
Diffstat (limited to 'build2/variable.hxx')
-rw-r--r--build2/variable.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/build2/variable.hxx b/build2/variable.hxx
index e45914a..9688944 100644
--- a/build2/variable.hxx
+++ b/build2/variable.hxx
@@ -1227,6 +1227,9 @@ namespace build2
size_t version = 0; // Incremented on each modification (variable_cache).
};
+ // Note that we guarantee ascending iteration order (e.g., for predictable
+ // dump output in tests).
+ //
using map_type = butl::prefix_map<reference_wrapper<const variable>,
value_data,
'.'>;