Make JSON_MultipleHeaders visible to unit tests

Define the macro JSON_TEST_USING_MULTIPLE_HEADERS to 0/1 depending on
JSON_MultipleHeaders.
This commit is contained in:
Florian Albrechtskirchinger 2022-08-05 10:39:23 +02:00
parent 0f9643cdf3
commit 76da3b7aeb
No known key found for this signature in database
GPG Key ID: 19618CE9B2D4BE6D

View File

@ -37,7 +37,8 @@ endif()
add_library(test_main OBJECT src/unit.cpp)
target_compile_definitions(test_main PUBLIC
DOCTEST_CONFIG_SUPER_FAST_ASSERTS
JSON_TEST_KEEP_MACROS)
JSON_TEST_KEEP_MACROS
JSON_TEST_USING_MULTIPLE_HEADERS=$<BOOL:${JSON_MultipleHeaders}>)
target_compile_features(test_main PRIVATE cxx_std_11)
target_compile_options(test_main PUBLIC
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>