Relative Content

Tag Archive for bazelbazel-cpp

How to use –fission in Bazel

I’m trying to use the --fission Bazel command line option to generate a binary with separate debug information in a Linux C++ project using the default GCC toolchain.

How to ignore BUILD files with bazel?

Currently I am trying to convert an existing cpp project to use the bazel build system. One of my projects dependencies is the library assimp. Currently, I have a git submodule setup that points to the assimp git repository, and in bazel I am adding this as a “local_repository” and then using rules_foreign_cc to build assimp from source. My current issue is that assimp has a subdirectory for tools used to contribute to assimp. However one of these tools has a BUILD.bazel file, that triggers a lot of errors from my current bazel setup that I cannot be asked to fix. I have already tried adding the file to .bazelignore but bazel doesn’t seem to respect it and still attempts to build it anyways. How do I fix this?

How to use a whole directory in a test/binary built with bazel

We have a bazel_binary which iterates through all the subdirectories of a fixed directory, and parses the .json files in them, as follows. We want to use a directory iterator because this directory can have more subdirectories in future with new .json files in them.