aboutsummaryrefslogtreecommitdiff
path: root/odb/odb.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-09 14:50:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-03-09 14:50:52 +0200
commit68ff21c56fb287790440208907ad2a851a108f89 (patch)
treec09702179692812b11d26828a34305e3eb5645b6 /odb/odb.cxx
parent1ec2ca23bbc6d81ccc4cf2384228f8034188687d (diff)
Pass -std and -framework options when extracting profile paths
Diffstat (limited to 'odb/odb.cxx')
-rw-r--r--odb/odb.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/odb/odb.cxx b/odb/odb.cxx
index 7a42c2d..662c18d 100644
--- a/odb/odb.cxx
+++ b/odb/odb.cxx
@@ -992,8 +992,8 @@ encode_plugin_option (string const& k, string const& cv)
static paths
profile_paths (strings const& sargs, char const* name)
{
- // Copy some of the arguments from the passed list. We only need
- // the g++ executable and the -I options.
+ // Copy some of the arguments from the passed list. We also need
+ // the g++ executable.
//
strings args;
@@ -1009,16 +1009,28 @@ profile_paths (strings const& sargs, char const* name)
{
string const& a (*i);
+ // -I
+ //
if (a.size () > 1 && a[0] == '-' && a[1] == 'I')
{
args.push_back (a);
if (a.size () == 2) // -I /path
{
- ++i;
- args.push_back (*i);
+ args.push_back (*(++i));
}
}
+ // -framework
+ //
+ else if (a == "-framework")
+ {
+ args.push_back (a);
+ args.push_back (*(++i));
+ }
+ // -std
+ //
+ else if (a.compare (0, 5, "-std=") == 0)
+ args.push_back (a);
}
// Create an execvp-compatible argument array.