| 1 |
# common build settings |
| 2 |
add_library(abi_compat_common INTERFACE) |
| 3 |
target_compile_definitions(abi_compat_common INTERFACE |
| 4 |
DOCTEST_CONFIG_SUPER_FAST_ASSERTS |
| 5 |
JSON_TEST_KEEP_MACROS) |
| 6 |
target_compile_features(abi_compat_common INTERFACE cxx_std_11) |
| 7 |
target_compile_options(abi_compat_common INTERFACE |
| 8 |
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>> |
| 9 |
# MSVC: Force to always compile with W4 |
| 10 |
$<$<CXX_COMPILER_ID:MSVC>:/W4> |
| 11 |
|
| 12 |
# https://github.com/nlohmann/json/pull/3229 |
| 13 |
$<$<CXX_COMPILER_ID:Intel>:-diag-disable=2196> |
| 14 |
|
| 15 |
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal> |
| 16 |
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations> |
| 17 |
$<$<CXX_COMPILER_ID:Intel>:-diag-disable=1786>) |
| 18 |
target_include_directories(abi_compat_common SYSTEM INTERFACE |
| 19 |
../thirdparty/doctest |
| 20 |
include) |
| 21 |
target_link_libraries(abi_compat_common INTERFACE ${NLOHMANN_JSON_TARGET_NAME}) |
| 22 |
|
| 23 |
# shared main() |
| 24 |
add_library(abi_compat_main STATIC main.cpp) |
| 25 |
target_link_libraries(abi_compat_main PUBLIC abi_compat_common) |
| 26 |
|
| 27 |
# add individual tests |
| 28 |
add_subdirectory(config) |
| 29 |
add_subdirectory(diag) |
| 30 |
add_subdirectory(inline_ns) |