diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-01 14:46:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-01 14:46:45 +0200 |
commit | 10fd2aface4486fc7f873dd2b54a1c2073c0b434 (patch) | |
tree | 5133810cf33b3e4ba4dfe78f659ee65599c31ffd /build/target-key | |
parent | 7996c2bfc2d7e998e2f9f1236d457ec7bea8ad8a (diff) |
Reimplement define as dynamic derivation rather than alias
New syntax:
define cli: file
The rationale is we need to be able to assign the file extension (using
type/pattern-specific variables). And if it is an alias, we will assign
it to the original target type.
Note that we could still support aliases if we need to. Will need to
bring back the id member in target_type that would normally point to
itself but for an alias would point to the origin.
Diffstat (limited to 'build/target-key')
-rw-r--r-- | build/target-key | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/build/target-key b/build/target-key index f49efb2..526a33a 100644 --- a/build/target-key +++ b/build/target-key @@ -8,7 +8,6 @@ #include <map> #include <string> #include <ostream> -#include <typeindex> #include <functional> // reference_wrapper #include <butl/utility> // compare_c_string @@ -31,8 +30,8 @@ namespace build friend bool operator< (const target_key& x, const target_key& y) { - const std::type_index& xt (x.type->id); - const std::type_index& yt (y.type->id); + const target_type* xt (x.type); + const target_type* yt (y.type); //@@ TODO: use compare() to compare once. |