From e58957d6491a08ec212958457c29a14eec787279 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 11 Mar 2016 16:24:37 +0200 Subject: Implement --config-{guess,sub} options --- build2/cxx/module.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'build2/cxx/module.cxx') diff --git a/build2/cxx/module.cxx b/build2/cxx/module.cxx index 9ebcc52..8e83a9b 100644 --- a/build2/cxx/module.cxx +++ b/build2/cxx/module.cxx @@ -4,11 +4,10 @@ #include -#include #include -#include #include +#include #include #include @@ -213,6 +212,17 @@ namespace build2 // Split/canonicalize the target. // + + // Did the user ask us to use config.sub? + // + if (ops.config_sub_specified ()) + { + ci.target = run (ops.config_sub (), + ci.target.c_str (), + [] (string& l) {return move (l);}); + l5 ([&]{trace << "config.sub target: '" << ci.target << "'";}); + } + try { string canon; @@ -236,7 +246,8 @@ namespace build2 // --config-sub to help us out. // fail << "unable to parse compiler target '" << ci.target << "': " - << e.what (); + << e.what () << + info << "consider using the --config-sub option"; } } -- cgit v1.1