MSVC: _CMAKE_INCLUDE_SYSTEM_FLAG_${lang}_WARNING should be configurable from outside
Hello! would it be possible to make this option externally configurable instead of hard coding it to "-external:W0". Currently it has the _ prefix which means it should be a private variable and is not really documented. So changing it this way I have a bit of a bad feeling.
For background, we have a larger C++ project that runs on multiple platforms (Windows, macOS, Linux, cell phones). We collect our dependencies through Conan, which accounts for internal libraries and third-party libraries. Currently, all are marked as external and therefore get an /external:W0, which is suboptimal. The default value when enabling system includes via compile flags is currently even W1. Some of our problems would be solved by enabling NO_SYSTEM_FROM_IMPORTED, but depending on the build configuration, other stuff is also flagged as system. So I would like to avoid passing W0 there.
Another problem is that /W0 also deactivates parts of /SDL e.g. the warnings as error for security relevant compile checks. See https://learn.microsoft.com/en-us/cpp/build/reference/sdl-enable-additional-security-checks?view=msvc-170
The default could still be W0, but this would make things more flexible for everyone.
Best, Patrick