if(MCDS_BUILD_TEST)
    # mcds_hl_decoder_test accesses internal (non-exported) symbols
    # (CMcdsDeviceModel, CMcdsHlDecoderPackaged, globals Mcr/Mdm/Mhd, etc.)
    # that are not visible in shared builds → LNK2019/LNK1120.  Pre-existing
    # limitation; the test is designed for static linking only.
    #
    # NOTE: mcds_hl_decoder_test is intentionally kept — it is the only test covering
    # chopped/paragraph-by-paragraph trace decoding (MCDSDL_DM_CONT mode).
    # Migration to Catch2 requires exposing CMcdsHlDecoderPackaged as public API.
    # See: .copilot-tracking/plans/migrate-legacy-tests.md (T4 blocked)
    if(NOT BUILD_SHARED_LIBS)
        add_subdirectory(mcds_hl_decoder_test)
    endif()
endif()
