Skip to content

daiki0321/bazel_sample_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bazel_sample_app

This is sample code for Bazel build with OpenCV and gtest.

Install Bazel

sudo apt install apt-transport-https curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
sudo apt update && sudo apt install bazel

Install OpenCV

# Install OpenCV
sudo apt-get install -y libopencv-dev

How to execute

# Build & Execute Main
bazel build sample_app:sample_app.bin
./bazel-bin/sample_app/sample_app.bin

# Build & Execute gtest
bazel run sample_app/test:test_sample_app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published