docopt / docopt.cpp

C++11 port of docopt
Boost Software License 1.0
1.05k stars 146 forks source link

Bazel support #91

Open nikodemus opened 6 years ago

nikodemus commented 6 years ago

Given this,

WORKSPACE:

http_archive(
    name = "docopt_cpp",
    url = "http://github.com/nikodemus/docopt.cpp/zipball/bazel-support/",
    sha256 = "a7f191ae531994069680b4fd20a6d310246dc980c18db35f92a31bbfde45bed6",
    strip_prefix = "nikodemus-docopt.cpp-47c7302",
    type = "zip",
)

BUILD:

cc_binary(
    name = "example",
    srcs = ["example.cpp"],
    deps = ["@docopt_cpp//:docopt"],
)

type things will just work to use #include "docopt.cpp/docopt.h" in example.cpp.

(Except of course with the upstream repo instead of my fork.)