From 858355cc3a7457f335a1d8bfd5c29a6baf191b1e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Apr 2012 13:22:27 +0200 Subject: Add support for -isystem -iquote -idirafter preprocessor options --- odb/odb.cxx | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'odb/odb.cxx') diff --git a/odb/odb.cxx b/odb/odb.cxx index ff28fbc..924afe2 100644 --- a/odb/odb.cxx +++ b/odb/odb.cxx @@ -268,16 +268,19 @@ main (int argc, char* argv[]) def_inc_dirs.push_back (a); } } - // -framework (Mac OS X) + // -isystem, -iquote, -idirafter, and -framework (Mac OS X) // - else if (a == "-framework") + else if (a == "-isystem" || + a == "-iquote" || + a == "-idirafter" || + a == "-framework") { def_inc_dirs.push_back (a); if (!s.more () || (a = s.next ()).empty ()) { - e << file << ": error: expected argument for the -framework " - << "option" << endl; + e << file << ": error: expected argument for the " << a + << " option" << endl; return 1; } @@ -401,16 +404,19 @@ main (int argc, char* argv[]) args.push_back (argv[i]); } } - // -framework (Mac OS X) + // -isystem, -iquote, -idirafter, and -framework (Mac OS X) // - else if (a == "-framework") + else if (a == "-isystem" || + a == "-iquote" || + a == "-idirafter" || + a == "-framework") { args.push_back (a); if (++i == argc || argv[i][0] == '\0') { - e << argv[0] << ": error: expected argument for the -framework " - << "option" << endl; + e << argv[0] << ": error: expected argument for the " << a + << " option" << endl; return 1; } @@ -1022,7 +1028,10 @@ profile_paths (strings const& sargs, char const* name) } // -framework // - else if (a == "-framework") + else if (a == "-isystem" || + a == "-iquote" || + a == "-idirafter" || + a == "-framework") { args.push_back (a); args.push_back (*(++i)); -- cgit v1.1