[go: nahoru, domu]

Skip to content

Commit

Permalink
bazel updates (Neargye#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Aug 23, 2023
1 parent 40e12d6 commit 745bf36
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 54 deletions.
5 changes: 5 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.github
test
doc
cmake
9 changes: 0 additions & 9 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ build --incompatible_use_platforms_repo_for_constraints
build --enable_runfiles
build --incompatible_strict_action_env

build:linux --host_platform=@magic_enum//bazel/platforms:linux
build:linux --platforms=@magic_enum//bazel/platforms:linux

build:macos --host_platform=@magic_enum//bazel/platforms:macos
build:macos --platforms=@magic_enum//bazel/platforms:macos

build:windows --host_platform=@magic_enum//bazel/platforms:windows
build:windows --platforms=@magic_enum//bazel/platforms:windows

common:ci --announce_rc
test:ci --test_output=errors
build:ci --curses=no
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.2
6.3.2
1 change: 1 addition & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ jobs:
- name: Bazel Test
continue-on-error: true
working-directory: test
run: bazelisk test //... --config=ci
1 change: 1 addition & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ jobs:
- name: Bazel Test
continue-on-error: true
working-directory: test
run: bazelisk test //... --config=ci
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ jobs:
- name: Bazel Test
continue-on-error: true
working-directory: test
run: bazelisk test //... --config=ci
16 changes: 8 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module(
name = "magic_enum",
version = "0.9.3",
compatibility_level = 0,
)

bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "rules_cc", version = "0.0.6")
module(
name = "magic_enum",
version = "0.9.3",
compatibility_level = 0,
)

bazel_dep(name = "rules_cc", version = "0.0.8")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
15 changes: 11 additions & 4 deletions bazel/copts.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
COPTS = select({
"@bazel_tools//tools/cpp:msvc": ["/std:c++17", "/permissive-"],
"//conditions:default": ["-std=c++17"],
})
load("@bazel_skylib//lib:selects.bzl", "selects")

COPTS = selects.with_or({
("@rules_cc//cc/compiler:clang", "@rules_cc//cc/compiler:gcc", "@rules_cc//cc/compiler:mingw-gcc"): [
"-std=c++17",
],
("@rules_cc//cc/compiler:msvc-cl", "@rules_cc//cc/compiler:clang-cl"): [
"/std:c++17",
"/permissive-",
],
})
25 changes: 0 additions & 25 deletions bazel/platforms/BUILD.bazel

This file was deleted.

13 changes: 6 additions & 7 deletions test/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module(name = "magic_enum_tests")

bazel_dep(name = "magic_enum")
bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "rules_cc", version = "0.0.6")

local_path_override(module_name = "magic_enum", path = "..")
module(name = "magic_enum_tests")

bazel_dep(name = "magic_enum")
bazel_dep(name = "rules_cc", version = "0.0.8")

local_path_override(module_name = "magic_enum", path = "..")

0 comments on commit 745bf36

Please sign in to comment.