mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Avoid unnecessary CMake warnings on Windows (#136393)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/136393 Approved by: https://github.com/ezyang
This commit is contained in:
@ -369,7 +369,7 @@ cmake_dependent_option(
|
||||
USE_C10D_MPI "USE C10D MPI" ON "USE_DISTRIBUTED;USE_MPI" OFF)
|
||||
cmake_dependent_option(
|
||||
USE_TENSORPIPE "Use TensorPipe. Only available if USE_DISTRIBUTED is on." ON
|
||||
"USE_DISTRIBUTED" OFF)
|
||||
"USE_DISTRIBUTED AND NOT WIN32" OFF)
|
||||
option(ONNX_ML "Enable traditional ONNX ML API." ON)
|
||||
option(HAVE_SOVERSION "Whether to add SOVERSION to the shared objects" OFF)
|
||||
option(BUILD_LIBTORCH_CPU_WITH_DEBUG
|
||||
|
@ -110,7 +110,7 @@ endif()
|
||||
# ---[ Create CAFFE2_BUILD_SHARED_LIBS for macros.h.in usage.
|
||||
set(CAFFE2_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
||||
|
||||
if(USE_NATIVE_ARCH)
|
||||
if(USE_NATIVE_ARCH AND NOT MSVC)
|
||||
check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||
add_definitions("-march=native")
|
||||
|
Reference in New Issue
Block a user