- Clone this repository
git clone https://github.com/juancgalan/cmake-gtest-docker-example.git example
- Change to the new directory
cd example
- Init submodules
git submodule init
- Update submodule (google test)
git submodule update
- Switch to build
cd build
- Generate make files
cmake ..
- Compile project
make
- Run tests
make test
- Clone this repository
git clone https://github.com/juancgalan/cmake-gtest-docker-example.git example
- Change to the new directory
cd example
- Init submodules
git submodule init
- Update submodule (google test)
git submodule update
- Run the docker compose command
docker-compose run dev bash
- Switch to the project directory
cd /usr/src/app
- Switch to build
cd build
- Generate make files
cmake ..
- Compile project
make
- Run tests
make test