Avoid warnings from system libraries/includes using CMake
问题 I have a large base of code and use CMake 3.19.3 to build the compile environment. I keep the code compiling in GCC (9.3) , CLang (11) , and ICC (19.1) . However, for ICC to work I need to remove a lot of warnings from the mandatory checks. My CMake config file looks like this: if(CMAKE_CXX_COMPILER_ID MATCHES "Intel") list(APPEND CMAKE_CXX_FLAGS "-no-ansi-alias") list(APPEND CMAKE_CXX_FLAGS "-Wno-error=missing-prototypes") list(APPEND CMAKE_CXX_FLAGS "-wd68") # integer conversion resulted in