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