support bazel complie this project and format code.
This commit is contained in:
@@ -11,7 +11,10 @@ public:
|
||||
void do_length_work() {};
|
||||
};
|
||||
|
||||
void process_big_object(std::unique_ptr<X>);
|
||||
void process_big_object(std::unique_ptr<X>)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
int main() {
|
||||
X my_x;
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
#include <functional>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
30
concurrency/concurrency_v1/chapter2/BUILD
Normal file
30
concurrency/concurrency_v1/chapter2/BUILD
Normal file
@@ -0,0 +1,30 @@
|
||||
# please run `bazel run //concurrency/concurrency_v1/chapter2:2.4_runtime`
|
||||
# please run `bazel run //concurrency/concurrency_v1/chapter2:2.1_basic`
|
||||
# please run `bazel run //concurrency/concurrency_v1/chapter2:2.3_ownership`
|
||||
# please run `bazel run //concurrency/concurrency_v1/chapter2:2_5_id`
|
||||
# please run `bazel run //concurrency/concurrency_v1/chapter2:2.2_transfer`
|
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||
|
||||
cc_binary(
|
||||
name = "2.4_runtime",
|
||||
srcs = ["2.4_runtime.cpp"],
|
||||
)
|
||||
cc_binary(
|
||||
name = "2.1_basic",
|
||||
srcs = ["2.1_basic.cpp"],
|
||||
)
|
||||
cc_binary(
|
||||
name = "2.3_ownership",
|
||||
srcs = ["2.3_ownership.cpp"],
|
||||
)
|
||||
cc_binary(
|
||||
name = "2_5_id",
|
||||
srcs = ["2_5_id.cpp"],
|
||||
copts = ["-std=c++11"]
|
||||
)
|
||||
cc_binary(
|
||||
name = "2.2_transfer",
|
||||
srcs = ["2.2_transfer.cpp"],
|
||||
copts = ["-std=c++11"]
|
||||
)
|
Reference in New Issue
Block a user