aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/compile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r--build2/cc/compile.cxx23
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);