From 7996c2bfc2d7e998e2f9f1236d457ec7bea8ad8a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 1 Dec 2015 13:39:09 +0200 Subject: Implement support for definition target type aliases For example: define cli=file Currently, the semantics is that of a real alias with only name differences that are used for display. See tests/define/buildfile for more use cases. --- build/cxx/target | 12 ++++++------ build/cxx/target.cxx | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'build/cxx') diff --git a/build/cxx/target b/build/cxx/target index bcc5ff1..fe27c79 100644 --- a/build/cxx/target +++ b/build/cxx/target @@ -17,8 +17,8 @@ namespace build using file::file; public: - virtual const target_type& type () const {return static_type;} static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} }; class ixx: public file @@ -27,8 +27,8 @@ namespace build using file::file; public: - virtual const target_type& type () const {return static_type;} static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} }; class txx: public file @@ -37,8 +37,8 @@ namespace build using file::file; public: - virtual const target_type& type () const {return static_type;} static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} }; class cxx: public file @@ -47,8 +47,8 @@ namespace build using file::file; public: - virtual const target_type& type () const {return static_type;} static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} }; //@@ TMP @@ -59,8 +59,8 @@ namespace build using file::file; public: - virtual const target_type& type () const {return static_type;} static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} }; class c: public file @@ -69,8 +69,8 @@ namespace build using file::file; public: - virtual const target_type& type () const {return static_type;} static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} }; } } diff --git a/build/cxx/target.cxx b/build/cxx/target.cxx index c23fdd0..e3d98e7 100644 --- a/build/cxx/target.cxx +++ b/build/cxx/target.cxx @@ -19,7 +19,8 @@ namespace build &target_factory, &target_extension_var, &search_file, - false + false, + nullptr }; constexpr const char ixx_ext_var[] = "ixx.ext"; @@ -31,7 +32,8 @@ namespace build &target_factory, &target_extension_var, &search_file, - false + false, + nullptr }; constexpr const char txx_ext_var[] = "txx.ext"; @@ -43,7 +45,8 @@ namespace build &target_factory, &target_extension_var, &search_file, - false + false, + nullptr }; constexpr const char cxx_ext_var[] = "cxx.ext"; @@ -55,7 +58,8 @@ namespace build &target_factory, &target_extension_var, &search_file, - false + false, + nullptr }; constexpr const char h_ext_var[] = "h.ext"; @@ -67,7 +71,8 @@ namespace build &target_factory, &target_extension_var, &search_file, - false + false, + nullptr }; constexpr const char c_ext_var[] = "c.ext"; @@ -79,7 +84,8 @@ namespace build &target_factory, &target_extension_var, &search_file, - false + false, + nullptr }; } } -- cgit v1.1