Skip to content

Remove MSVC warning D9025 overriding '/MD' with '/MT' #443

@andreasfertig

Description

@andreasfertig

The Windows builds using cl.exe, for example "MSVC 2022 / LLVM 13 @ Windows Release" produce the warning D9025:

[1/12 0.1/sec] Building CXX object CMakeFiles\insights.dir\DPrint.cpp.obj
cl : Command line warning D9025 : overriding '/MD' with '/MT'
cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'
cl : Command line warning D9025 : overriding '/EHc' with '/EHc-'
cl : Command line warning D9025 : overriding '/GR' with '/GR-'

The full output can be found here github.com/andreasfertig/cppinsights/runs/5076959142

The values MT, EHs-, ... are obtained from llvm-config github.com/andreasfertig/cppinsights/runs/5076959142:

-- llvm_config(LLVM_CXXFLAGS)=>/external:I D:\a\cppinsights\cppinsights\current\include    /EHs-c- /GR- -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DUNICODE -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS;

It looks likes cmake sets some kind of default (MD) which is not correctly overridden.

The values from llvm_config should be used for the build, other defaults should be removed.

Andreas

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions