- 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
- See third_party/ for the test frameworks that are included in this project.
- Source code for the Google Test framework - version 1.8.1 - is downloaded automatically when CMake is run - see /CMake/googletest/CMakeLists.txt.in, and is then built when the project is built.
- Similarly, the {fmt} library is downloaded automatically when CMake is run - see /CMake/fmt/CMakeLists.txt.in, and is then built when the project is built.
- Boost needs to be found by CMake's
find_package()
- see /tests/Boost_Tests/CMakeLists.txt.
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