Search code examples
bazel

Bazel BUILD files conflicts with a build/ folder


I am migrating my Cmake project to Bazel. At the root of my project is a build folder that I use to run Cmake.

To migrate to Bazel, I need to create a BUILD file at the root of my project. However, on macOS, I cannot create it due to the presence of my build folder.

Can I use a different name for Bazel's BUILD files? Or should I get rid of my build folder?


Solution

  • Bazel also supports using BUILD.bazel as the filename, which should resolve this issue (BUILD.bazel is preferred if both BUILD.bazel and BUILD exist).

    Please try using that and see if it helps!