1# common build settings 2add_library(abi_compat_common INTERFACE) 3target_compile_definitions(abi_compat_common INTERFACE 4 DOCTEST_CONFIG_SUPER_FAST_ASSERTS 5 JSON_TEST_KEEP_MACROS) 6target_compile_features(abi_compat_common INTERFACE cxx_std_11) 7target_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>) 18target_include_directories(abi_compat_common SYSTEM INTERFACE 19 ../thirdparty/doctest 20 include) 21target_link_libraries(abi_compat_common INTERFACE ${NLOHMANN_JSON_TARGET_NAME}) 22 23# shared main() 24add_library(abi_compat_main STATIC main.cpp) 25target_link_libraries(abi_compat_main PUBLIC abi_compat_common) 26 27# add individual tests 28add_subdirectory(config) 29add_subdirectory(diag) 30add_subdirectory(inline_ns) 31