From 63f6a8256e3f9fb47cb941be63baa70e2be48d3b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Feb 2017 15:35:44 +0200 Subject: Implement target_set locking, including extension update --- build2/prerequisite.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'build2/prerequisite.cxx') diff --git a/build2/prerequisite.cxx b/build2/prerequisite.cxx index ac89456..47da950 100644 --- a/build2/prerequisite.cxx +++ b/build2/prerequisite.cxx @@ -50,6 +50,12 @@ namespace build2 // prerequisite // + static inline optional + to_ext (const string* e) + { + return e != nullptr ? optional (*e) : nullopt; + } + prerequisite:: prerequisite (target_type& t) : proj (nullopt), @@ -57,7 +63,7 @@ namespace build2 dir (t.dir), out (t.out), // @@ If it's empty, then we treat as undetermined? name (t.name), - ext (t.ext ()), + ext (to_ext (t.ext ())), scope (t.base_scope ()), target (&t) { -- cgit v1.1