Skip to content

Commit

Permalink
[build] fix compiling with clang13 (pytorch#80916)
Browse files Browse the repository at this point in the history
This check is incorrect; clang 13.1.0 doesn't exist.
Pull Request resolved: pytorch#80916
Approved by: https://github.com/malfet
  • Loading branch information
suo authored and pytorchmergebot committed Jul 6, 2022
1 parent 45f7718 commit b349d15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,8 @@ if(USE_FBGEMM)
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0.0)
# See https://github.com/pytorch/pytorch/issues/74352
target_compile_options(asmjit PRIVATE -Wno-deprecated-copy)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.1.0)
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.6)
OR("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0.0))
# -Wno-unused-but-set-variable doesn't exist in Apple clang version 13.0.0 (clang-1300.0.29.30)
target_compile_options(asmjit PRIVATE -Wno-unused-but-set-variable)
endif()
Expand Down

0 comments on commit b349d15

Please sign in to comment.