From 6f1c4669933a85c0875ac2721574bf50c2f310e8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 May 2024 11:23:52 +0200 Subject: Add note on potentially mismatching cxx.std in module sidebuilds --- libbuild2/cc/compile-rule.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libbuild2/cc/compile-rule.cxx') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index 5acd698..7629ed5 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -6677,6 +6677,15 @@ namespace build2 // string extra; + // @@ What happens if different projects used different standards? + // Specifically, how do we detect this and what can the user do + // about it? For the latter question, forcing the same standard + // with config.cxx.std seems like the only sensible option. For + // the former, we could read the value of cxx.std using our + // buildfile first-line peeking mechanism. But doing that for + // every module interface feels inefficient so we will probably + // need to cache it on the per-project basis. Maybe/later. + // if (const string* std = cast_null (rs[x_std])) extra += string (x) + ".std = " + *std + '\n'; -- cgit v1.1