Skip to content

Disabling MSVC warnings 4251 and 4275 #3143

Open
@martingalvan-volue

Description

@martingalvan-volue

Hi, I noticed that

target_compile_options(spdlog PUBLIC $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<NOT:$<COMPILE_LANGUAGE:CUDA>>>:/wd4251
disables the following MSVC linker warnings:

https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4251
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275

There's no explanation given in the code as to why these are disabled; however, looking at the description it seems like it's not correct to do so (4251 seems particularly concerning). Is there a reason why they're disabled instead of fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions