diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-20 09:29:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-20 09:29:56 +0200 |
commit | c23346c4cda9e0c2318c302dc6014d3fef53a6d3 (patch) | |
tree | 2a24d82d2445a8adbdf6e88ef22a5ce4d1957a19 /build/parser.cxx | |
parent | 8bd89cfca333e58f6990d7d168649dfc79878f31 (diff) |
Rework extension handling logic
We no longer support hxx{vector.}. Rather, the target type can decide,
e.g., based on a config variable, whether to append an extension. Also,
in the future we may support a syntax to specify that this is a complete
name, e.g., hxx{'vector'}.
Diffstat (limited to 'build/parser.cxx')
-rw-r--r-- | build/parser.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build/parser.cxx b/build/parser.cxx index 1cb0684..d1f3d8a 100644 --- a/build/parser.cxx +++ b/build/parser.cxx @@ -242,12 +242,12 @@ namespace build // Extract extension. // - string::size_type j (n.rfind ('.')); + string::size_type j (path::traits::find_extension (n)); if (j != string::npos) { - e = &extension_pool.find (n.c_str () + j + 1); - n.resize (j); + e = &extension_pool.find (n.c_str () + j); + n.resize (j - 1); } } @@ -318,12 +318,12 @@ namespace build // Extract extension. // - string::size_type j (n.rfind ('.')); + string::size_type j (path::traits::find_extension (n)); if (j != string::npos) { - e = &extension_pool.find (n.c_str () + j + 1); - n.resize (j); + e = &extension_pool.find (n.c_str () + j); + n.resize (j - 1); } } |