aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/utility.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/utility.hxx')
-rw-r--r--libbuild2/cc/utility.hxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/libbuild2/cc/utility.hxx b/libbuild2/cc/utility.hxx
index 458aa25..6ba4a20 100644
--- a/libbuild2/cc/utility.hxx
+++ b/libbuild2/cc/utility.hxx
@@ -9,6 +9,7 @@
#include <libbuild2/utility.hxx>
#include <libbuild2/target.hxx>
+#include <libbuild2/filesystem.hxx>
#include <libbuild2/bin/target.hxx>
#include <libbuild2/bin/utility.hxx>
@@ -32,13 +33,30 @@ namespace build2
extern const dir_path module_build_dir; // cc/build/
extern const dir_path module_build_modules_dir; // cc/build/modules/
- // Compile output type from source target.
+ // Compile output type from output target type (obj*{}, bmi*{}, etc).
+ //
+ // If input unit type is specified, then restrict the tests only to output
+ // types that can be produced from this input.
//
otype
- compile_type (const target&, unit_type);
+ compile_type (const target_type&, optional<unit_type> = nullopt);
+
+ inline otype
+ compile_type (const target& t, optional<unit_type> ut = nullopt)
+ {
+ return compile_type (t.type (), ut);
+ }
compile_target_types
compile_types (otype);
+
+ // Normalize an absolute path to an existing header.
+ //
+ inline void
+ normalize_header (path& f)
+ {
+ normalize_external (f, "header");
+ }
}
}