Define CMake/CTest tests
Instead of copying the test executable and the JSON files used by the tests at install time, define CMake/CTest tests for running the json_unit executable from any build directory with the project's source directory as its working directory. - call enable_testing in the main lists file to allow the definition of tests - remove install commands from the test directory's lists file - define two tests - json_unit_default for running the default tests by executing json_unit without any arguments - json_unit_all for running all the tests by executing json_unit with the "*" argument - update the AppVeyor configuration file to use the new testing method
This commit is contained in:
parent
0a393b8374
commit
639d63217e
3 changed files with 16 additions and 11 deletions
|
|
@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.0)
|
|||
# define the project
|
||||
project(nlohmann_json VERSION 2.0.0 LANGUAGES CXX)
|
||||
|
||||
enable_testing()
|
||||
|
||||
option(BuildTests "Build the unit tests" ON)
|
||||
|
||||
# define project variables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue