Quiet SDL2 CMake configure logs.

This only takes effect on CMake > 3.17.0.
See CMake's [release notes](https://cmake.org/cmake/help/v3.17/release/3.17.html?highlight=cmake_message_log_level#variables) and [docs](https://cmake.org/cmake/help/v3.17/variable/CMAKE_MESSAGE_LOG_LEVEL.html).

Fixes #1299.

Closes https://github.com/google/iree/pull/1313

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/1313 from ScottTodd:cmake-configure 600851963196c06213b32fd82641d1fe6ec95949
PiperOrigin-RevId: 303846155
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b71703b..c336278 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -157,7 +157,13 @@
 endif()
 
 if(${IREE_BUILD_DEBUGGER} OR ${IREE_BUILD_SAMPLES})
-  add_subdirectory(third_party/sdl2 EXCLUDE_FROM_ALL)
+  # sdl2 logs are spammy - change log level while adding
+  function(include_sdl2)
+    set(CMAKE_MESSAGE_LOG_LEVEL "WARNING")
+    add_subdirectory(third_party/sdl2 EXCLUDE_FROM_ALL)
+  endfunction()
+  include_sdl2()
+
   add_subdirectory(build_tools/third_party/dear_imgui EXCLUDE_FROM_ALL)
 endif()