json/cmake
Florian Albrechtskirchinger 00c4a4d066 Refactor unit test creation
Add functions for creating tests and to supply test- and
standard-specific build settings.

Raises minimum CMake version to 3.13 in test directory.

json_test_add_test_for(
    <file>
    MAIN <main>
    [CXX_STANDARDS <version_number>...] [FORCE])

Given a <file> unit-foo.cpp, produces

    test-foo_cpp<version_number>

if C++ standard <version_number> is supported by the compiler and
thesource file contains JSON_HAS_CPP_<version_number>.  Use FORCE to
create the test regardless of the file containing
JSON_HAS_CPP_<version_number>.  Test targets are linked against <main>.
CXX_STANDARDS defaults to "11".

json_test_set_test_options(
    all|<tests>
    [CXX_STANDARDS all|<args>...]
    [COMPILE_DEFINITIONS <args>...]
    [COMPILE_FEATURES <args>...]
    [COMPILE_OPTIONS <args>...]
    [LINK_LIBRARIES <args>...]
    [LINK_OPTIONS <args>...])

Supply test- and standard-specific build settings.
Specify multiple tests using a list e.g., "test-foo;test-bar".

Must be called BEFORE the test is created.
2022-03-13 16:11:20 +01:00
..
ci.cmake Fix C++20/gcc-12 issues (Part 1) (#3379) 2022-03-07 22:19:28 +01:00
config.cmake.in cmake: fix package config to deal with versioning and namespaces 2018-09-30 09:56:33 -04:00
download_test_data.cmake fix cmake script overwriting compiler path 2020-08-07 16:08:02 +08:00
nlohmann_jsonConfigVersion.cmake.in add comments 2020-04-17 15:44:12 -04:00
pkg-config.pc.in pkg-config.pc.in: Don't concatenate paths 2021-03-29 21:43:49 +00:00
test.cmake Refactor unit test creation 2022-03-13 16:11:20 +01:00