From 0070e360a142dff0e40156e6c219190b2e94fa1e Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 10 Dec 2024 12:41:14 +0900 Subject: [PATCH] Disable MSVC warnings (#1680) --- mlx/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mlx/CMakeLists.txt b/mlx/CMakeLists.txt index c30177966..fb91d9044 100644 --- a/mlx/CMakeLists.txt +++ b/mlx/CMakeLists.txt @@ -18,6 +18,11 @@ target_sources( ${CMAKE_CURRENT_SOURCE_DIR}/linalg.cpp ${CMAKE_CURRENT_SOURCE_DIR}/backend/metal/metal.h) +if(MSVC) + # Disable some MSVC warnings to speed up compilation. + target_compile_options(mlx PUBLIC /wd4068 /wd4244 /wd4267 /wd4804) +endif() + if(MLX_BUILD_CPU) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backend/common) else()