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

Fix bazel 3.3.0 #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
new_http_archive(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "gtest",
build_file = "BUILD.gtest",
build_file = "@//:BUILD.gtest",
sha256 = "f3ed3b58511efd272eb074a3a6d6fb79d7c2e6a0e374323d1e6bcbcc1ef141bf",
strip_prefix = "googletest-release-1.8.0",
url = "https://github.com/google/googletest/archive/release-1.8.0.zip",
Expand Down
1 change: 1 addition & 0 deletions examples/cpp_redis_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

int main(void) {
winsock_initializer winsock_init;
#endif
//! Enable logging
cpp_redis::active_logger = std::unique_ptr<cpp_redis::logger>(new cpp_redis::logger);

Expand Down
4 changes: 4 additions & 0 deletions examples/cpp_redis_future_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@
#include <cpp_redis/cpp_redis>

#include <iostream>
#if _WIN32
#include "winsock_initializer.h"
#endif

int
main(void) {
#if _WIN32
winsock_initializer winsock_init;
#endif

//! Enable logging
cpp_redis::active_logger = std::unique_ptr<cpp_redis::logger>(new cpp_redis::logger);
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp_redis_high_availability_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@
#include <cpp_redis/cpp_redis>

#include <iostream>
#if _WIN32
#include "winsock_initializer.h"
#endif

int
main(void) {
#if _WIN32
winsock_initializer winsock_init;
#endif
//! Enable logging
cpp_redis::active_logger = std::unique_ptr<cpp_redis::logger>(new cpp_redis::logger);

Expand Down
4 changes: 4 additions & 0 deletions examples/cpp_redis_kill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@

#include <iostream>
#include <sstream>
#if _WIN32
#include "winsock_initializer.h"
#endif

int
main(void) {
#if _WIN32
winsock_initializer winsock_init;
#endif
cpp_redis::client client;

client.connect("127.0.0.1", 6379, [](const std::string& host, std::size_t port, cpp_redis::connect_state status) {
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp_redis_multi_exec.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// The MIT License (MIT)

#if _WIN32
#include "winsock_initializer.h"
#endif
#include <cpp_redis/cpp_redis>
#include <string>

int
main(void) {
#if _WIN32
winsock_initializer winsock_init;
#endif
cpp_redis::client client;

client.connect("127.0.0.1", 6379,
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp_redis_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
#include <iostream>
#include <mutex>
#include <signal.h>
#if _WIN32
#include "winsock_initializer.h"
#endif

std::condition_variable should_exit;

Expand All @@ -38,7 +40,9 @@ sigint_handler(int) {

int
main(void) {
#if _WIN32
winsock_initializer winsock_init;
#endif
//! Enable logging
cpp_redis::active_logger = std::unique_ptr<cpp_redis::logger>(new cpp_redis::logger);

Expand Down
2 changes: 1 addition & 1 deletion repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

cpp_redis_repositories:
def cpp_redis_repositories():
"""Add external dependencies to the workspace."""
maybe(
http_archive,
Expand Down