- CMake 3.8 or higher
- A C++11 or above compiler to use the library
- A C++17 or above compiler to run the project's own tests
- A version of Catch2 is included in the source - see lib/Catch.hpp
- A version of doctest is included in the source - see files in lib/
- Source code for the Google Test framework - version 1.8.1 - is downloaded automatically when CMake is run - see CMakeLists.txt.in, and is then built when the project is built.
Decide where to put the build files that CMake will generate.
In the following, we're putting the output in cmake-build-vs - that location is already ignored by git.
-
Open a Command window
-
Then run:
cd ApprovalTests.cpp mkdir cmake-build-vs cd cmake-build-vs cmake -G "Visual Studio 15 2017" ..
- Follow the instructions for experimental support of Microsoft Visual C++ compiler
- Output is put in
cmake-build-debug - Tested with Visual Studio 2017
- Major limitation: Debugging is not yet supported by CLion, when compiling with Visual Studio, as of CLion 2017.3.3
- Code builds fine
- Tests run fine
- Reporters run fine