Disable MSVC warnings (#1680)

This commit is contained in:
Cheng 2024-12-10 12:41:14 +09:00 committed by GitHub
parent 9df8fed046
commit 0070e360a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()