Skip to content

ourarash/bazel_tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Tutorial on How to Use Bazel for C++

This repo is a simple demo for teaching how to use Bazel for C++ projects.

Please refer to the examples folder:

A Video on how to use this repo:

Bazel Tutorial for C++

Bazel Examples:

Example 1

Running Example 1:

bazel run examples/example1:example1

Check All dependencies of Example 1:

bazel query  --noimplicit_deps \
"deps(//examples/example1:example1)" \
--output graph | dot -Tsvg > output.svg

Example 2

Running Example 2:

bazel run examples/example2:example2

Check All dependencies of Example 2:

bazel query  --noimplicit_deps \
"deps(//examples/example2:example2)" \
--output graph | dot -Tsvg > output.svg

Example 3

Running Example 3:

bazel run examples/example3:example3

Check all dependencies of Example 3:

bazel query  --noimplicit_deps \
"deps(//examples/example3:example3)" \
--output graph | dot -Tsvg > output.svg

Check all paths from lib1 to example3:

bazel query \
"allpaths(//examples/example3:example3, //examples/example3/lib1:lib1)" \
--output graph | dot -Tsvg > output.svg

About

Bazel Tutorial For C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published