aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/bin/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-12-11 07:20:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-12-11 07:20:18 +0200
commit4cf87fa84a6938e262fd6122e654e5a483a78abe (patch)
tree9d6a7802d156dc287562f77184396e0cc7b62d23 /libbuild2/bin/init.cxx
parent3074c5e1409ad49c0793db6384ecbc6ac4ed33a9 (diff)
Add support for module interface-only libraries
Also suppress generation of the object file in cases where we don't need it.
Diffstat (limited to 'libbuild2/bin/init.cxx')
-rw-r--r--libbuild2/bin/init.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx
index 9c16432..49ba518 100644
--- a/libbuild2/bin/init.cxx
+++ b/libbuild2/bin/init.cxx
@@ -116,12 +116,23 @@ namespace build2
//
// If unspecified, defaults to false for liba{} and to true for libu*{}.
//
- vp.insert<bool> ("bin.whole", variable_visibility::target);
+ vp.insert<bool> ("bin.whole", variable_visibility::target);
- vp.insert<string> ("bin.exe.prefix");
- vp.insert<string> ("bin.exe.suffix");
- vp.insert<string> ("bin.lib.prefix");
- vp.insert<string> ("bin.lib.suffix");
+ // Mark library as binless.
+ //
+ // For example, the user can mark a C++ library consisting of only
+ // module interfaces as binless so it becomes a modules equivalent to
+ // header-only library (which we will call a module interface-only
+ // library).
+ //
+ vp.insert<bool> ("bin.binless", variable_visibility::target);
+
+ // Executable and library name prefixes and suffixes.
+ //
+ vp.insert<string> ("bin.exe.prefix");
+ vp.insert<string> ("bin.exe.suffix");
+ vp.insert<string> ("bin.lib.prefix");
+ vp.insert<string> ("bin.lib.suffix");
// The optional custom clean patterns should be just the pattern stem,
// without the library prefix/name or extension. For example, `-[A-Z]`