aboutsummaryrefslogtreecommitdiff
path: root/build2/prerequisite.cxx
diff options
context:
space:
mode:
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)
{