aboutsummaryrefslogtreecommitdiff
path: root/build2/test/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-02 10:20:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commit53f02bf28dae507a51515ed6ac03226d68816494 (patch)
tree234838165e802df9c777324c0fe766ce0190d814 /build2/test/target.cxx
parent601ffbd700e7c11a101215d641ea09d0181d4771 (diff)
Store extension in target map key rather than in target
This is in preparation for locking its modification/access.
Diffstat (limited to 'build2/test/target.cxx')
-rw-r--r--build2/test/target.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/build2/test/target.cxx b/build2/test/target.cxx
index a5801e8..3bf00c1 100644
--- a/build2/test/target.cxx
+++ b/build2/test/target.cxx
@@ -11,7 +11,7 @@ namespace build2
{
namespace test
{
- static target*
+ static pair<target*, optional<string>>
testscript_factory (const target_type&,
dir_path d,
dir_path o,
@@ -21,7 +21,8 @@ namespace build2
if (!e)
e = (n == "testscript" ? string () : "test");
- return new testscript (move (d), move (o), move (n), move (e));
+ return make_pair (
+ new testscript (move (d), move (o), move (n)), move (e));
}
static optional<string>