aboutsummaryrefslogtreecommitdiff
path: root/build2/prerequisite.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-02 15:35:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commit63f6a8256e3f9fb47cb941be63baa70e2be48d3b (patch)
treed2799d1d605a27fa0a13d63f974f26fa78306e36 /build2/prerequisite.cxx
parentd263455d5ac0d87541144dd7a37eb6255b721a89 (diff)
Implement target_set locking, including extension update
Diffstat (limited to 'build2/prerequisite.cxx')
-rw-r--r--build2/prerequisite.cxx8
1 files changed, 7 insertions, 1 deletions
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<string>
+ to_ext (const string* e)
+ {
+ return e != nullptr ? optional<string> (*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)
{