Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add build recipe for rt entt to be used #140

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import %workspace%/bazel/common.bazelrc

try-import %workspace%/user.bazelrc

build --@boost.dll//:use_std_fs
query --@boost.dll//:use_std_fs
build --@boost.process//:use_std_fs
query --@boost.process//:use_std_fs
17 changes: 11 additions & 6 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_ecsact//ecsact:defs.bzl", "ecsact_build_recipe")
load("@rules_ecsact//ecsact:defs.bzl", "ecsact_build_recipe", "ecsact_build_recipe_bundle")
load("//bazel:copts.bzl", "copts")

package(default_visibility = ["//visibility:public"])
Expand All @@ -16,15 +16,15 @@ cc_library(
)

ecsact_build_recipe(
name = "ecsact_rt_entt",
codegen_plugins = {
"@ecsact_lang_cpp//cpp_header_codegen": "src",
"//rt_entt_codegen": "src",
},
name = "ecsact_rt_entt_recipe",
srcs = [
":headers",
"//runtime:sources",
],
codegen_plugins = {
"@ecsact_lang_cpp//cpp_header_codegen": "src",
"//rt_entt_codegen": "src",
},
fetch_srcs = {
"include/entt": [
"https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entt.hpp",
Expand Down Expand Up @@ -166,3 +166,8 @@ ecsact_build_recipe(
)

exports_files(["build_recipe.yml"])

ecsact_build_recipe_bundle(
name = "ecsact_rt_entt",
recipes = [":ecsact_rt_entt_recipe"],
)
zaucy marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 8 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(

bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "rules_ecsact", version = "0.5.3")
bazel_dep(name = "rules_ecsact", version = "0.5.5")
bazel_dep(name = "ecsact_runtime", version = "0.6.7")
bazel_dep(name = "ecsact_lang_cpp", version = "0.4.5")
bazel_dep(name = "boost.mp11", version = "1.83.0.bzl.1")
Expand All @@ -15,6 +15,8 @@ bazel_dep(name = "ecsact_codegen", version = "0.3.1")
bazel_dep(name = "ecsact_cli", version = "0.3.13")
bazel_dep(name = "xxhash", version = "0.8.2")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
bazel_dep(name = "boost.dll", version = "1.83.0.bzl.2")
bazel_dep(name = "boost.process", version = "1.83.0.bzl.2")

bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True)
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
Expand All @@ -31,11 +33,16 @@ git_override(
remote = "https://github.com/zaucy/libarchive.git",
)

ecsact = use_extension("@rules_ecsact//ecsact:extensions.bzl", "ecsact", dev_dependency = True)
ecsact.toolchain(use_ecsact_cli = True)
use_repo(ecsact, "ecsact_toolchain")

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(llvm_version = "17.0.6")
use_repo(llvm, "llvm_toolchain")

register_toolchains(
"@llvm_toolchain//:all",
"@ecsact_toolchain//:all",
dev_dependency = True,
)