This is an project that shows how to use googletest with CMake. I was trying to do this for myself, and struggled to find a good full example that was easy to understand so I figured that I would make one.
CMake is a build automation tool.
This is meant not a tutorial for CMake, but if you need one, try this: https://learnxinyminutes.com/docs/cmake/
GoogleTest unit testing library for c++.