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?
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 theSYSTEM
option passed toFetchContent_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 theSYSTEM
option. Can this be fixed?