From f19959de304afaff2b3d539c9bef1f493ede5fbd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Nov 2022 06:27:33 +0200 Subject: Add support for Objective-C/C++ compilation in cc module --- libbuild2/cc/target.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'libbuild2/cc/target.cxx') diff --git a/libbuild2/cc/target.cxx b/libbuild2/cc/target.cxx index 3f71eb1..d743752 100644 --- a/libbuild2/cc/target.cxx +++ b/libbuild2/cc/target.cxx @@ -25,7 +25,6 @@ namespace build2 }; extern const char h_ext_def[] = "h"; - const target_type h::static_type { "h", @@ -40,7 +39,6 @@ namespace build2 }; extern const char c_ext_def[] = "c"; - const target_type c::static_type { "c", @@ -54,8 +52,21 @@ namespace build2 target_type::flag::none }; - extern const char pc_ext[] = "pc"; // VC14 rejects constexpr. + extern const char m_ext_def[] = "m"; + const target_type m::static_type + { + "m", + &cc::static_type, + &target_factory, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, + nullptr, + &file_search, + target_type::flag::none + }; + extern const char pc_ext[] = "pc"; // VC14 rejects constexpr. const target_type pc::static_type { "pc", @@ -70,7 +81,6 @@ namespace build2 }; extern const char pca_ext[] = "static.pc"; // VC14 rejects constexpr. - const target_type pca::static_type { "pca", @@ -85,7 +95,6 @@ namespace build2 }; extern const char pcs_ext[] = "shared.pc"; // VC14 rejects constexpr. - const target_type pcs::static_type { "pcs", -- cgit v1.1