aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-01 14:46:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-01 14:46:45 +0200
commit10fd2aface4486fc7f873dd2b54a1c2073c0b434 (patch)
tree5133810cf33b3e4ba4dfe78f659ee65599c31ffd /build/cxx
parent7996c2bfc2d7e998e2f9f1236d457ec7bea8ad8a (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/cxx')
-rw-r--r--build/cxx/target.cxx24
1 files changed, 6 insertions, 18 deletions
diff --git a/build/cxx/target.cxx b/build/cxx/target.cxx
index e3d98e7..c8680b7 100644
--- a/build/cxx/target.cxx
+++ b/build/cxx/target.cxx
@@ -13,79 +13,67 @@ namespace build
constexpr const char hxx_ext_var[] = "hxx.ext";
const target_type hxx::static_type
{
- typeid (hxx),
"hxx",
&file::static_type,
&target_factory<hxx>,
&target_extension_var<hxx_ext_var>,
&search_file,
- false,
- nullptr
+ false
};
constexpr const char ixx_ext_var[] = "ixx.ext";
const target_type ixx::static_type
{
- typeid (ixx),
"ixx",
&file::static_type,
&target_factory<ixx>,
&target_extension_var<ixx_ext_var>,
&search_file,
- false,
- nullptr
+ false
};
constexpr const char txx_ext_var[] = "txx.ext";
const target_type txx::static_type
{
- typeid (txx),
"txx",
&file::static_type,
&target_factory<txx>,
&target_extension_var<txx_ext_var>,
&search_file,
- false,
- nullptr
+ false
};
constexpr const char cxx_ext_var[] = "cxx.ext";
const target_type cxx::static_type
{
- typeid (cxx),
"cxx",
&file::static_type,
&target_factory<cxx>,
&target_extension_var<cxx_ext_var>,
&search_file,
- false,
- nullptr
+ false
};
constexpr const char h_ext_var[] = "h.ext";
const target_type h::static_type
{
- typeid (h),
"h",
&file::static_type,
&target_factory<h>,
&target_extension_var<h_ext_var>,
&search_file,
- false,
- nullptr
+ false
};
constexpr const char c_ext_var[] = "c.ext";
const target_type c::static_type
{
- typeid (c),
"c",
&file::static_type,
&target_factory<c>,
&target_extension_var<c_ext_var>,
&search_file,
- false,
- nullptr
+ false
};
}
}