From 550a95b2ce32b1910515813196785afa9573d612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=83=E6=B0=B4=E3=81=A1=E3=82=83=E3=82=93?= Date: Wed, 8 Nov 2023 23:02:43 +0800 Subject: [PATCH] Update CMakeLists.txt to set not treating warnings as error due to DirectMLX. some warnings in DirectMLX like "warning C4189: 'spatialDimensionCount': local variable is initialized but not referenced " will be treated in building pydirectml. set warning level WX to WX- to avoid failure --- Python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/CMakeLists.txt b/Python/CMakeLists.txt index c274b66c..89fad579 100644 --- a/Python/CMakeLists.txt +++ b/Python/CMakeLists.txt @@ -34,7 +34,7 @@ pybind11_add_module( src/device.cpp ) -target_compile_options(pydirectml PRIVATE /W4 /WX) +target_compile_options(pydirectml PRIVATE /W4 /WX-) target_include_directories(pydirectml PRIVATE pybind11/include gpgmm/src/include gpgmm/ ${DML_PATH}/include ${DMLX_PATH}) target_link_directories(pydirectml PRIVATE ${DML_PATH}/bin/x64-win) target_link_libraries(pydirectml PRIVATE gpgmm dxgi.lib d3d12.lib directml.lib)