diff options
author | 2015-07-23 09:54:33 +0000 | |
---|---|---|
committer | 2015-07-23 11:01:00 +0000 | |
commit | 3fe87d7b03522c357efa804fffc41c35aa175ebd (patch) | |
tree | ed0012bbc4ee09d00583cec18a9abd66277f8235 /src/main/cpp | |
parent | efa388529ee48bdd80ccf46c2b372a00f1608f18 (diff) |
Add a BUILD file to src/main/cpp/util.
--
MOS_MIGRATED_REVID=98918607
Diffstat (limited to 'src/main/cpp')
-rw-r--r-- | src/main/cpp/BUILD | 39 | ||||
-rw-r--r-- | src/main/cpp/util/BUILD | 45 |
2 files changed, 50 insertions, 34 deletions
diff --git a/src/main/cpp/BUILD b/src/main/cpp/BUILD index f2f4579679..c1f472b4fd 100644 --- a/src/main/cpp/BUILD +++ b/src/main/cpp/BUILD @@ -1,33 +1,5 @@ -cc_library( - name = "util", - srcs = [ - "util/errors.cc", - "util/file.cc", - "util/numbers.cc", - "util/port.cc", - "util/strings.cc", - ], - hdrs = [ - "util/errors.h", - "util/exit_code.h", - "util/file.h", - "util/numbers.h", - "util/port.h", - "util/strings.h", - ], - copts = [ - "-DBLAZE_OPENSOURCE=1", - ], - includes = ["."], -) - -cc_library( - name = "md5", - srcs = ["util/md5.cc"], - hdrs = ["util/md5.h"], - includes = ["."], - visibility = ["//visibility:public"], -) +# Description: +# The Bazel launcher. filegroup( name = "blaze_util_os", @@ -50,9 +22,7 @@ cc_binary( copts = [ "-Wno-sign-compare", "-DBLAZE_JAVA_CPU=\\\"k8\\\"", - "-DBLAZE_OPENSOURCE=1", ], - includes = ["."], linkopts = select({ "//src:darwin": [ ], @@ -62,8 +32,9 @@ cc_binary( }), visibility = ["//src:__pkg__"], deps = [ - ":md5", - ":util", + "//src/main/cpp/util", + "//src/main/cpp/util:md5", + "//src/main/cpp/util:strings", "//third_party/ijar:zip", ], ) diff --git a/src/main/cpp/util/BUILD b/src/main/cpp/util/BUILD new file mode 100644 index 0000000000..ef3b2f952f --- /dev/null +++ b/src/main/cpp/util/BUILD @@ -0,0 +1,45 @@ +# Description: +# C++ utility source for Bazel + +cc_library( + name = "util", + srcs = [ + "errors.cc", + "file.cc", + "numbers.cc", + "port.cc", + ], + hdrs = [ + "errors.h", + "file.h", + "numbers.h", + "port.h", + ], + visibility = ["//visibility:public"], + deps = [ + ":strings", + ], +) + +cc_library( + name = "md5", + srcs = ["md5.cc"], + hdrs = ["md5.h"], + visibility = ["//visibility:public"], +) + +cc_library( + name = "strings", + srcs = ["strings.cc"], + hdrs = [ + # This really belongs into its own library, but that doesn't work on the + # Mac, because of issue #61 (header-only libraries don't build). + "exit_code.h", + "strings.h", + ], + # Automatically propagate the symbol definition to rules depending on this. + defines = [ + "BLAZE_OPENSOURCE", + ], + visibility = ["//visibility:public"], +) |