Omit default /W3 flag on MSVC, then set it for our targets.
This will let us set different warning flags for third party libraries (like /W0 to ignore warnings).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e29487..742f551 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,11 @@
# limitations under the License.
cmake_minimum_required(VERSION 3.13.4)
+# Do not set MSVC warning flags like /W3 by default (since 3.15):
+# https://cmake.org/cmake/help/v3.15/policy/CMP0092.html
+if(POLICY CMP0092)
+ cmake_policy(SET CMP0092 NEW)
+endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project(iree CXX C)