A C++ project template on Ubuntu built with:
- Install GoogleTest.
- Install CMake.
Go to the project folder and run:
mkdir -p build
cd build
cmake ..
cmake --build .
Go to the build
folder and run:
ctest -VV
Go to the build/bin
folder and run:
./cpp-sample
- Install Docker.
Go to the project folder and run the following command to create an image:
docker image build . -t <image>
<image>
should be replaced with a custom Docker image name.
docker container run <image> ctest --test-dir .. -VV
docker container run <image>
Currently Makefile
does not support GoogleTest.
Go to the project folder and run:
make
Go to the build
folder and run:
./cpp-sample
.
โโโ .github
โ โโโ workflows
โ โโโ cmake-gtest.yaml
โ โโโ docker.yaml
โ โโโ make.yaml
โโโ cmake
โ โโโ hello.cmake
โโโ docs
โ โโโ badges
โ โโโ C++.svg
โ โโโ Linux.svg
โ โโโ Made-with-CMake.svg
โ โโโ Made-with-Make.svg
โ โโโ Made-with-Docker.svg
โ โโโ Made-with-GitHub-Actions.svg
โ โโโ PowerShell.svg
โโโ include
โ โโโ foo
โ โโโ foo.h
โโโ src
โ โโโ foo
โ โ โโโ CMakeLists.txt
โ โ โโโ foo.cpp
โ โ โโโ private_foo_test.cpp
โ โ โโโ private_foo.cpp
โ โ โโโ private_foo.h
โ โโโ CMakeLists.txt
โ โโโ main.cpp
โโโ tests
โ โโโ CMakeLists.txt
โ โโโ foo_test.cpp
โโโ .clang-format
โโโ .gitignore
โโโ Build-CMake.ps1
โโโ CITATION.cff
โโโ CMakeLists.txt
โโโ Dockerfile
โโโ Makefile
โโโ README.md