From 8e904346350cff0453c8bcd524a40a631fc05485 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Jan 2019 13:09:18 +0200 Subject: Tighten cc rules matching Specifically, make sure the rule does not match if there is a c-common prerequisites that it doesn't recognize. --- build2/cxx/target.cxx | 8 ++++---- build2/cxx/target.hxx | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'build2/cxx') diff --git a/build2/cxx/target.cxx b/build2/cxx/target.cxx index 3431bc4..bdfa609 100644 --- a/build2/cxx/target.cxx +++ b/build2/cxx/target.cxx @@ -16,7 +16,7 @@ namespace build2 const target_type hxx::static_type { "hxx", - &file::static_type, + &cc::static_type, &target_factory, nullptr, /* fixed_extension */ &target_extension_var, @@ -30,7 +30,7 @@ namespace build2 const target_type ixx::static_type { "ixx", - &file::static_type, + &cc::static_type, &target_factory, nullptr, /* fixed_extension */ &target_extension_var, @@ -44,7 +44,7 @@ namespace build2 const target_type txx::static_type { "txx", - &file::static_type, + &cc::static_type, &target_factory, nullptr, /* fixed_extension */ &target_extension_var, @@ -72,7 +72,7 @@ namespace build2 const target_type mxx::static_type { "mxx", - &file::static_type, + &cc::static_type, &target_factory, nullptr, /* fixed_extension */ &target_extension_var, diff --git a/build2/cxx/target.hxx b/build2/cxx/target.hxx index e31d311..94295d1 100644 --- a/build2/cxx/target.hxx +++ b/build2/cxx/target.hxx @@ -18,30 +18,30 @@ namespace build2 using cc::h; using cc::c; - class hxx: public file + class hxx: public cc::cc { public: - using file::file; + using cc::cc; public: static const target_type static_type; virtual const target_type& dynamic_type () const {return static_type;} }; - class ixx: public file + class ixx: public cc::cc { public: - using file::file; + using cc::cc; public: static const target_type static_type; virtual const target_type& dynamic_type () const {return static_type;} }; - class txx: public file + class txx: public cc::cc { public: - using file::file; + using cc::cc; public: static const target_type static_type; @@ -61,12 +61,12 @@ namespace build2 // The module interface unit is both like a header (e.g., we need to // install it) and like a source (we need to compile it). Plus, to // support dual use (modules/headers) it could actually be #include'd - // (and even in both cases). + // (and even in both cases e.g., by different codebases). // - class mxx: public file + class mxx: public cc::cc { public: - using file::file; + using cc::cc; public: static const target_type static_type; -- cgit v1.1