diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-27 14:45:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-27 14:45:05 +0200 |
commit | bf959a7fc119f9156c4b84c9d0a10900d9153f8d (patch) | |
tree | d19b96238f58e305d936d186901edd1cf98e0c93 /build2/bin/target.hxx | |
parent | 24f74ea70a19ccd7bcb489853fc73a972ab8638f (diff) |
Initial infrastructure for utility libraries
Diffstat (limited to 'build2/bin/target.hxx')
-rw-r--r-- | build2/bin/target.hxx | 71 |
1 files changed, 69 insertions, 2 deletions
diff --git a/build2/bin/target.hxx b/build2/bin/target.hxx index 13d7596..e0c0358 100644 --- a/build2/bin/target.hxx +++ b/build2/bin/target.hxx @@ -117,6 +117,73 @@ namespace build2 virtual const target_type& dynamic_type () const {return static_type;} }; + // Common base for lib{} and libu{} groups. + // + class libx: public target + { + public: + using target::target; + + public: + static const target_type static_type; + }; + + // The libu{} target group (utility library). + // + // All the members are static libraries that differ base on the kind of + // object files they contains. Note that the group is more like obj{} + // rather than lib{} in that one does not build the group directly rather + // picking a suitable member. + // + class libux: public file // Common base of all libuX{} static libraries. + { + public: + using file::file; + + public: + static const target_type static_type; + }; + + class libue: public libux + { + public: + using libux::libux; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class libua: public libux + { + public: + using libux::libux; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class libus: public libux + { + public: + using libux::libux; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + + class libu: public libx + { + public: + using libx::libx; + + public: + static const target_type static_type; + virtual const target_type& dynamic_type () const {return static_type;} + }; + // The lib{} target group. // class liba: public file @@ -149,10 +216,10 @@ namespace build2 const libs* s = nullptr; }; - class lib: public target, public lib_members + class lib: public libx, public lib_members { public: - using target::target; + using libx::libx; virtual group_view group_members (action_type) const override; |