aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-23 10:56:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-23 10:56:59 +0200
commit4c2203d85ae4773e5fc7c27eae246e9ca2779421 (patch)
tree6ab955d6069704009b2fbda4f76dc32a787c75db
parent8ea8497a18db2f8dbc3511de3ad5a3225bcf0dcf (diff)
Rework slightly executable project buildfile generated by bdep-new
-rw-r--r--bdep/new.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx
index aed7e2d..8553a9b 100644
--- a/bdep/new.cxx
+++ b/bdep/new.cxx
@@ -569,11 +569,14 @@ namespace bdep
"$libs" <<
(itest ? " testscript" : "") << endl;
else
- os << "./: exe{" << s << "}: libue{" << s << "}" <<
- (itest ? " testscript" : "") << endl
- << "libue{" << s << "}: " <<
- "{" << hs << ' ' << x << "}{** -**.test...} $libs" << endl
- << endl
+ {
+ os << "./: exe{" << s << "}: libue{" << s << "}: " <<
+ "{" << hs << ' ' << x << "}{** -**.test...} $libs" << endl;
+
+ if (itest)
+ os << "exe{" << s << "}: testscript" << endl;
+
+ os << endl
<< "# Unit tests." << endl
<< "#" << endl
@@ -592,6 +595,7 @@ namespace bdep
"}{+$n} $d/testscript{+$n}" << endl
<< " $d/exe{$n}: libue{" << s << "}: bin.whole = false"<< endl
<< "}" << endl;
+ }
os << endl
<< m << ".poptions =+ \"-I$out_root\" \"-I$src_root\"" << endl;