From ce8a94e6a76097ef7eeb34df4257991a20599712 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Jan 2015 11:39:21 +0200 Subject: Track file extension in target, prerequisite --- build/utility | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'build/utility') diff --git a/build/utility b/build/utility index bef6335..bcbf834 100644 --- a/build/utility +++ b/build/utility @@ -5,8 +5,11 @@ #ifndef BUILD_UTILITY #define BUILD_UTILITY +#include +#include #include // strcmp + namespace build { struct compare_c_string @@ -22,6 +25,16 @@ namespace build template bool operator() (const P& x, const P& y) const {return *x < *y;} }; + + // Pools (@@ perhaps move into a separate header). + // + struct string_pool: std::unordered_set + { + const std::string& + find (const char* s) {return *emplace (s).first;} + }; + + extern string_pool extension_pool; } #endif // BUILD_UTILITY -- cgit v1.1