From a89f1e4f4efd291beedea03c65c8185b7d0df20e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Dec 2017 12:06:59 +0200 Subject: Distinguish between "fixed" and "default" target extensions This fixes wrong merging of, say, file{README} and file{README.MySQL} (in libmysqlclient). --- build2/cxx/target.cxx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'build2/cxx') diff --git a/build2/cxx/target.cxx b/build2/cxx/target.cxx index bde41fc..b7c3f8c 100644 --- a/build2/cxx/target.cxx +++ b/build2/cxx/target.cxx @@ -2,6 +2,8 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file +#include + #include using namespace std; @@ -10,16 +12,15 @@ namespace build2 { namespace cxx { - extern const char ext_var[] = "extension"; // VC14 rejects constexpr. - extern const char hxx_ext_def[] = "hxx"; const target_type hxx::static_type { "hxx", &file::static_type, &target_factory, - &target_extension_var, - &target_pattern_var, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -31,8 +32,9 @@ namespace build2 "ixx", &file::static_type, &target_factory, - &target_extension_var, - &target_pattern_var, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -44,8 +46,9 @@ namespace build2 "txx", &file::static_type, &target_factory, - &target_extension_var, - &target_pattern_var, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -57,8 +60,9 @@ namespace build2 "cxx", &cc::static_type, &target_factory, - &target_extension_var, - &target_pattern_var, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false @@ -70,8 +74,9 @@ namespace build2 "mxx", &file::static_type, &target_factory, - &target_extension_var, - &target_pattern_var, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, nullptr, &file_search, false -- cgit v1.1