diff options
Diffstat (limited to 'build2/buildfile')
-rw-r--r-- | build2/buildfile | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/build2/buildfile b/build2/buildfile index bd730c3..64935f3 100644 --- a/build2/buildfile +++ b/build2/buildfile @@ -5,15 +5,33 @@ import libs = libbutl%lib{butl} import libs += libpkgconf%lib{pkgconf} -exe{b}: cxx{b} libue{b} +./: exe{b}: cxx{b} libue{b} -libue{b}: {hxx ixx txx cxx}{** -b -b-options -config -version} \ - {hxx ixx cxx}{b-options} {hxx}{config version} \ +libue{b}: {hxx ixx txx cxx}{** -b -b-options -config -version -**.test...} \ + {hxx ixx cxx}{b-options} {hxx}{config version} \ $libs hxx{config}: in{config} hxx{version}: in{version} $src_root/manifest +# Unit tests. +# +exe{*.test}: +{ + test = true + install = false +} + +for t: cxx{**.test...} +{ + d = $directory($t) + n = $name($t)... + b = $path.base($name($t)) + + ./: $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n +$b+*.test...} + $d/exe{$n}: libue{b}: bin.whole = false +} + # Build options. # # Pass our compiler target to be used as build2 host. |