diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-09-05 14:54:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-09-05 14:54:27 +0200 |
commit | 1ada80642d06d8ef5144933178191eba262a1372 (patch) | |
tree | 382fdf1af65e4847b481a3714444e0678d062442 /build2/cc/compile.cxx | |
parent | ed0bcc9878d03fae898db921af686e351a1eea8f (diff) |
Handle /usr/local brain-death
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r-- | build2/cc/compile.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index fce5d21..a89555c 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -340,6 +340,12 @@ namespace build2 hash_options (cs, t, c_poptions); hash_options (cs, t, x_poptions); + + // Extra system header dirs (last). + // + for (const dir_path& d: sys_inc_dirs) + cs.append (d.string ()); + hash_options (cs, t, c_coptions); hash_options (cs, t, x_coptions); hash_std (cs); @@ -731,6 +737,14 @@ namespace build2 append_options (args, t, c_poptions); append_options (args, t, x_poptions); + // Extra system header dirs (last). + // + for (const dir_path& d: sys_inc_dirs) + { + args.push_back ("-I"); + args.push_back (d.string ().c_str ()); + } + // Some compile options (e.g., -std, -m) affect the preprocessor. // append_options (args, t, c_coptions); @@ -1392,6 +1406,15 @@ namespace build2 append_options (args, t, c_poptions); append_options (args, t, x_poptions); + + // Extra system header dirs (last). + // + for (const dir_path& d: sys_inc_dirs) + { + args.push_back ("-I"); + args.push_back (d.string ().c_str ()); + } + append_options (args, t, c_coptions); append_options (args, t, x_coptions); |