Skip to content
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
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enable Bzlmod for every Bazel command
common --enable_bzlmod
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ third_party/googletest/
third_party/abseil-cpp/
third_party/abseil_cpp/
bazel-*
MODULE.bazel.lock
.DS_Store
26 changes: 13 additions & 13 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cc_library(
compatible_with = [
],
deps = [
"@com_googlesource_code_re2//:re2",
"@re2//:re2",
],
)

Expand Down Expand Up @@ -60,8 +60,8 @@ cc_test(
srcs = ["effcee/check_test.cc"],
deps = [
":effcee",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)

Expand All @@ -70,8 +70,8 @@ cc_test(
srcs = ["effcee/cursor_test.cc"],
deps = [
":effcee",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)

Expand All @@ -80,8 +80,8 @@ cc_test(
srcs = ["effcee/diagnostic_test.cc"],
deps = [
":effcee",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)

Expand All @@ -90,8 +90,8 @@ cc_test(
srcs = ["effcee/match_test.cc"],
deps = [
":effcee",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)

Expand All @@ -100,8 +100,8 @@ cc_test(
srcs = ["effcee/options_test.cc"],
deps = [
":effcee",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)

Expand All @@ -110,7 +110,7 @@ cc_test(
srcs = ["effcee/result_test.cc"],
deps = [
":effcee",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@googletest//:gtest_main",
"@googletest//:gtest",
],
)
17 changes: 17 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module(name = "effcee")

bazel_dep(name = "rules_python", version = "0.31.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
configure_coverage_tool = False,
ignore_root_user_error = True,
python_version = "3.11",
)

bazel_dep(
name = "googletest",
version = "1.14.0",
dev_dependency = True,
)

bazel_dep(name = "re2", version = "2024-04-01")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we need:

bazel_dep(name = "rules_python", version = "0.31.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
    configure_coverage_tool = False,
    ignore_root_user_error = True,
    python_version = "3.11",
)

I think that's all the necessary pieces?

17 changes: 0 additions & 17 deletions WORKSPACE

This file was deleted.

10 changes: 5 additions & 5 deletions kokoro/macos-clang-release-bazel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ git config --global --add safe.directory $SRC
cd $SRC
/usr/bin/python3 utils/git-sync-deps

# Get bazel 5.0.0
gsutil cp gs://bazel/5.0.0/release/bazel-5.0.0-darwin-x86_64 .
chmod +x bazel-5.0.0-darwin-x86_64
# Get bazel 7.0.2
gsutil cp gs://bazel/7.0.2/release/bazel-7.0.2-darwin-x86_64 .
chmod +x bazel-7.0.2-darwin-x86_64

echo $(date): Build everything...
./bazel-5.0.0-darwin-x86_64 build --cxxopt=-std=c++17 :all
./bazel-7.0.2-darwin-x86_64 build --cxxopt=-std=c++17 :all
echo $(date): Build completed.

echo $(date): Starting bazel test...
./bazel-5.0.0-darwin-x86_64 test --cxxopt=-std=c++17 :all
./bazel-7.0.2-darwin-x86_64 test --cxxopt=-std=c++17 :all
echo $(date): Bazel test completed.
2 changes: 1 addition & 1 deletion kokoro/scripts/linux/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if [ $TOOL = "cmake" ]; then
ctest --output-on-failure --timeout 300
echo $(date): ctest completed.
elif [ $TOOL = "bazel" ]; then
using bazel-5.0.0
using bazel-7.0.2

echo $(date): Build everything...
bazel build --cxxopt=-std=c++17 :all
Expand Down