Skip to content

Commit d968057

Browse files
committed
fix(windows): guard coroutine-deprecation silence behind if(MSVC)
The suppression macro is MSVC/MSVC-STL-specific; wrapping it in an if(MSVC) block makes the intent explicit and follows idiomatic CMake practice. https://claude.ai/code/session_01GgBCj6SCcnzXL7rhZX75eR
1 parent 1e8f527 commit d968057

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

windows/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ add_definitions(-DUNICODE -D_UNICODE)
3737
# Several Flutter plugins (audioplayers_windows, permission_handler_windows,
3838
# flutter_local_notifications_windows) still include that header, so silence the
3939
# deprecation across all targets and plugin subdirectories added below.
40-
add_compile_definitions(_SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS)
40+
if(MSVC)
41+
add_compile_definitions(_SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS)
42+
endif()
4143

4244
# Compilation settings that should be applied to most targets.
4345
#

0 commit comments

Comments
 (0)