jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
5.06k stars 1.82k forks source link

Compiler warnings can't be disabled when using FetchContent #1300

Open nilsvu opened 1 month ago

nilsvu commented 1 month ago

I followed the instructions in the README to include yaml-cpp in my CMake project with FetchContent_Declare. When building the code, I get compiler warnings like those listed in https://github.com/jbeder/yaml-cpp/issues/1208. This is not unexpected. However, I want to silence these compiler warnings since I can't do anything about them and they alert the users of my code. Since CMake version 3.25 this is possible with the SYSTEM option passed to FetchContent_Declare: https://cmake.org/cmake/help/latest/module/FetchContent.html#command:fetchcontent_declare This option works for other external packages that I fetch, but it has no effect on yaml-cpp. I still get the compiler warnings even if I use the SYSTEM option. Can this be fixed?

jbeder commented 1 month ago

Not sure how - open to suggestions?