Hi,
I'm trying to use boost in my C++ project and I'm trying to set boost up as an external dependency.
In my boost directory I have a empty WORKSPACE file and a BUILD file with the following:
cc_library(
name = "boost-optional",
hdrs = glob(["boost_1_61_0/boost/**/*.hpp", "boost_1_61_0/boost/**/*.h"]),
includes = ["boost_1_61_0/boost"],
copts = ["-std=c++11"],
visibility = ["//visibility:public"],
)
In my main project, where I am trying to use boost, I have the following in my WORKSPACE file:
local_repository(
name = "boost-optional",
path = "/Users/przemeklach/dev/boost-optional",
)
I'm not including it in any of my targets yet but when I try to build anything I get the following error:
ERROR: /Users/przemeklach/source/Master/WORKSPACE:10:1: local_repository rule //external:boost-optional's name field must be a legal workspace name.
ERROR: Error evaluating WORKSPACE file.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Encountered error while reading extension file 'tools/cpp/cc_configure.bzl': no such package '@bazel_tools//tools/cpp': error loading package 'external': Could not load //external package.
Looking at the docs this seems like a straight forward process. Anyone can see what I'm doing wrong here?
Thanks in advance.
Przemek