Skip to content

Commit 5dd7d2e

Browse files
committed
Add the nanobind component
Add the `nanobind` component, which is used by revng to create python binding from C++.
1 parent 3cacf4f commit 5dd7d2e

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#@ load("@ytt:data", "data")
2+
#@ load("@ytt:overlay", "overlay")
3+
#@ load("/lib/cmake.lib.yml", "typical_cmake_builds")
4+
5+
---
6+
#@ def build_args():
7+
pre_configure_script: |
8+
git -C "$SOURCE_DIR" submodule update --init --recursive
9+
configure_dir: '"$SOURCE_DIR/standalone"'
10+
extra_cmake_args:
11+
- -DBUILD_SHARED_LIBS=ON
12+
build_dependencies:
13+
- host-cxx-toolchain
14+
dependencies:
15+
- host-libcxx
16+
#@ end
17+
18+
#@overlay/match by=overlay.all, expects=1
19+
#@overlay/match-child-defaults missing_ok=True
20+
---
21+
components:
22+
nanobind:
23+
license: LICENSE
24+
repository: nanobind
25+
builds:
26+
default: #@ typical_cmake_builds(**build_args())["release"]

.orchestra/config/components/revng.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dependencies:
3434
- libarchive
3535
- flamegraph
3636
- zstd
37+
- nanobind
3738
use_asan: false
3839
post_install_script: |
3940
if [ "$RUN_TESTS" -eq 1 ]; then

.orchestra/config/lib/cmake.lib.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#@ pre_install_script="",
6666
#@ post_install_script="",
6767
#@ test=False,
68+
#@ configure_dir="",
6869
#@ ):
6970

7071
#@ for flavor, opts in typical_cmake_flavors(use_asan=use_asan).items():
@@ -85,7 +86,11 @@
8586
8687
cd "$BUILD_DIR";
8788
(@= cmake @) \
89+
(@- if configure_dir: @)
90+
(@= configure_dir @) \
91+
(@- else: @)
8892
"$SOURCE_DIR" \
93+
(@- end @)
8994
-G"(@= build_system @)" \
9095
(@= expand_args(cmdline_cmake_base_configuration(cmake_build_type=opts["cmake_build_type"], extra_compiler_flags=flavor_extra_compiler_flags)) @)
9196
(@- if extra_cmake_args: @) \

0 commit comments

Comments
 (0)