aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-11-22 08:22:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-11-22 08:22:49 +0200
commitc8d9235115f5c0c3b20bdb0cf59b05761cb3d3de (patch)
tree8eb09513625a157e1c436c4e156b1c87f0506c44 /libbuild2/buildfile
parent9bb8b63156f6dfb42f9ddab77f253ae0bda02d5a (diff)
Add support for `import std` in Clang 17 or later with libc++
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile11
1 files changed, 11 insertions, 0 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 6d7c597..5ef0006 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -222,6 +222,17 @@ if ($install.root != [null])
$directory($install.resolve($install.buildfile)), '\\', '\\\\')\"
#\
+ # Data directory or src_root if not installed.
+ #
+ # Note: normalized in both cases.
+ #
+ {obja objs}{utility-installed}: cxx.poptions += \
+ -DBUILD2_INSTALL_DATA=\"$regex.replace(\
+ $install.resolve($install.data), '\\', '\\\\')\"
+
+ {obja objs}{utility-uninstalled}: cxx.poptions += \
+ -DBUILD2_INSTALL_DATA=\"$regex.replace(\
+ $src_root, '\\', '\\\\')\"
}
if ($cxx.target.class != 'windows')