Nonviolent Pigeon Manifestation

    generator-bazel-cpp

    0.2.1 • Public • Published

    generator-bazel-cpp NPM version Build Status Dependency Status

    A generator to generate C++ project using bazel.

    Installation

    Ensure bazel exists in your system path. bazelisk is recommended since it also manages bazel versions.

    First, install Yeoman and generator-bazel-cpp using npm (we assume you have pre-installed node.js).

    npm install -g yo
    npm install -g generator-bazel-cpp

    Then generate your new project:

    yo bazel-cpp

    Development

    This project uses bazel-compilation-database to generate compile_commands.json. vscode-clangd is recommended for code completion and navigation.

    edit

    Once project structure has been changed, run ./gencomp.sh and restart clangd server in VSCode.

    Debug

    VSCode Task Shell Input and CodeLLDB extensions are required to debug.

    Debug using launch.json

    launch.json has been configured to debug unit tests. To start debugging, just set breaking points and focus on your test file, click Run Debug Test.

    debug launch

    Debug using TestMate

    VSCode C++ TestMate is a great tool to run and debug C++ unit tests (including Catch2, GoogleTest).

    This project has been configured to adapt the extension. To start running or debugging unit tests, build tests (with VSCode build task or in the terminal) first and then test suites will be shown in the test explorer.

    run build

    testmate

    Happy debugging!

    debug testmate

    License

    MIT © ajihyf

    Install

    npm i generator-bazel-cpp

    DownloadsWeekly Downloads

    6

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    25.2 kB

    Total Files

    31

    Last publish

    Collaborators

    • ajihyf