aboutsummaryrefslogtreecommitdiff
path: root/build2/version
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-10-26 19:07:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-10-26 19:07:42 +0200
commit296575ba025ded840304c1e3b6365a6b6ee7ea48 (patch)
treeda8ecb3dfc8178b7ddf00c51a21fbe8d375cd435 /build2/version
parent1dba8a7b279c857e9c13cbd6496849f5501e9944 (diff)
Add config.{c,cxx}.{id,version,target} configuration variables
These variables allow overriding guessed compiler id/version/target, for example, in case of mis-guesses or when working with compilers that don't report their base (e.g., GCC, Clang) with -v/--version (common in the embedded space).
Diffstat (limited to 'build2/version')
-rw-r--r--build2/version/snapshot-git.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/build2/version/snapshot-git.cxx b/build2/version/snapshot-git.cxx
index 278c5ce..3f19e62 100644
--- a/build2/version/snapshot-git.cxx
+++ b/build2/version/snapshot-git.cxx
@@ -31,9 +31,10 @@ namespace build2
//
{
const char* args[] {"git", "-C", d, "status", "--porcelain", nullptr};
- r.committed = run<string> (3 /* verbosity */,
- args,
- [](string& s) {return move (s);}).empty ();
+ r.committed = run<string> (
+ 3 /* verbosity */,
+ args,
+ [](string& s, bool) {return move (s);}).empty ();
}
// Now extract the commit id and date. One might think that would be