Skip to content

Commit

Permalink
Added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bialger committed Jan 17, 2024
1 parent bf1a424 commit bf8e281
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# C++ project template with Google Tests and CI/CD

This is a project template. Feel free to use it. It contains all pre-configured
CMakeLists.txt, so to use it, just replace project name with your in
[main CmakeLists.txt](CMakeLists.txt), and all target and executable names in
[CI/CD script](./.github/workflows/ci_tests.yml).

## How to run

Run following commands from project directory.

1. Create CMake cache

```shell
cmake -S . -B cmake-build
```

2. Build main target

```shell
cmake --build cmake-build --target cpp_tests
```

3. Build tests target

```shell
cmake --build cmake-build --target cpp_tests_tests
```

4. Run main target

* On Windows:

```shell
.\cmake-build\bin\cpp_tests.exe || .\cmake-build\bin\Debug\cpp_tests.exe
```

* On POSIX:

```shell
.\cmake-build\bin\cpp_tests
```

5. Run tests

* On Windows:

```shell
.\cmake-build\bin\cpp_tests_tests.exe || .\cmake-build\bin\Debug\cpp_tests_tests.exe
```

* On POSIX:

```shell
.\cmake-build\bin\cpp_tests_tests
```

0 comments on commit bf8e281

Please sign in to comment.