Skip to content

Add bazel WORKSPACE and deps.bzl

Stephen Ryan requested to merge update_bazel_targets into main

Relates: #11 (closed)

This allows the generated engine to be built with Bazel as a standalone project with its' own WORKSPACE. It can also be included in other projects as either a git submodule or as a bazel repository. Within the engine directory, one can run bazel test //:all to run all tests.

The dependencies' build files are handled as follows:

  • OpenSCENARIO API (engine/deps/openscenario_api): Uses pre-compiled libraries, since no Bazel build file exists, and it would be complicated to translate the Cmake build system into Bazel. The build file for using these libraries is located in engine/bazel/openscenario_api.BUILD. If a build file is created to compile the OpenSCENARIO API from source, it would replace this one.
  • MantleAPI (engine/deps/scenario_api): Uses the existing BUILD.bazel in the MantleAPI repository.
  • Units (engine/deps/units): No bazel build file exists in the repository, so a build file is provided in engine/bazel/units.BUILD.
  • Yase (engine/deps/yase): Uses the existing BUILD.bazel in the Yase repository.
Edited by Andreas Rauschert

Merge request reports