From 50e725ae23124a10d56a615fb8b0ae80d0d2b4d3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Jun 2020 13:07:31 +0200 Subject: Add metadata for exe{b}, including whether it is statically-linked Use this information to omit ad hoc C++ recipe tests is testing statically- linked build system. --- build2/buildfile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build2/buildfile') diff --git a/build2/buildfile b/build2/buildfile index 3be724c..4d62fb5 100644 --- a/build2/buildfile +++ b/build2/buildfile @@ -16,6 +16,17 @@ for m: bash bin c cc cxx in version exe{b}: {hxx ixx txx cxx}{** -b-options} {hxx ixx cxx}{b-options} $libs +# Target metadata, see also --build2-metadata in b.cxx. +# +exe{b}: +{ + export.metadata = 1 b + b.name = [string] b + b.version = $version + b.checksum = $version + b.static = ($bin.link_member(exe) == liba) +} + # Build options. # # Pass our compiler target to be used as build2 host. -- cgit v1.1