Skip to content

Suppress "defining YAML_CPP_API for DLL import" message on every translation unit #1369

@azonenberg

Description

@azonenberg

When compiling programs using yaml-cpp on MSYS64/mingw64 (and possibly other Windows platforms), a #pragma message is displayed from dll.h:22 in every single source file being compiled.

This results in huge amounts of log messages generated during the build which makes finding other warnings/errors difficult. The message seems pretty pointless, so there should be a way to turn it off either by default or via a #define or something.

Example build spam from ngscopeclient (this repeats for 500+ source files)

 [104/543] Building CXX object lib/scopehal/CMakeFiles/scopehal.dir/SCPINullTransport.cpp.obj
In file included from D:/a/_temp/msys64/mingw64/include/yaml-cpp/parser.h:13,
                 from D:/a/_temp/msys64/mingw64/include/yaml-cpp/yaml.h:10,
                 from D:/a/scopehal-apps/scopehal-apps/lib/scopehal/scopehal.h:62,
                 from D:/a/scopehal-apps/scopehal-apps/lib/scopehal/SCPINullTransport.cpp:41:
D:/a/_temp/msys64/mingw64/include/yaml-cpp/dll.h:22:65: note: '#pragma message: Defining YAML_CPP_API for DLL import'
   22 | #        pragma message( "Defining YAML_CPP_API for DLL import" )
      |                                                                 ^
[105/543] Building CXX object lib/scopehal/CMakeFiles/scopehal.dir/SCPISocketCANTransport.cpp.obj
In file included from D:/a/_temp/msys64/mingw64/include/yaml-cpp/parser.h:13,
                 from D:/a/_temp/msys64/mingw64/include/yaml-cpp/yaml.h:10,
                 from D:/a/scopehal-apps/scopehal-apps/lib/scopehal/scopehal.h:62,
                 from D:/a/scopehal-apps/scopehal-apps/lib/scopehal/SCPISocketCANTransport.cpp:37:
D:/a/_temp/msys64/mingw64/include/yaml-cpp/dll.h:22:65: note: '#pragma message: Defining YAML_CPP_API for DLL import'
   22 | #        pragma message( "Defining YAML_CPP_API for DLL import" )
      |                                                                 ^
[106/543] Building CXX object lib/scopehal/CMakeFiles/scopehal.dir/SCPIUARTTransport.cpp.obj
In file included from D:/a/_temp/msys64/mingw64/include/yaml-cpp/parser.h:13,
                 from D:/a/_temp/msys64/mingw64/include/yaml-cpp/yaml.h:10,
                 from D:/a/scopehal-apps/scopehal-apps/lib/scopehal/scopehal.h:62,
                 from D:/a/scopehal-apps/scopehal-apps/lib/scopehal/SCPIUARTTransport.cpp:37:
D:/a/_temp/msys64/mingw64/include/yaml-cpp/dll.h:22:65: note: '#pragma message: Defining YAML_CPP_API for DLL import'
   22 | #        pragma message( "Defining YAML_CPP_API for DLL import" )
      |                                                                 ^

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