mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Add clang -Wconstant-conversion (#80461)
This catchs the compilation error detected in https://github.com/pytorch/pytorch/pull/75400 Pull Request resolved: https://github.com/pytorch/pytorch/pull/80461 Approved by: https://github.com/osalpekar
This commit is contained in:
parent
1058b47562
commit
39bd81a11f
|
|
@ -840,6 +840,7 @@ if(NOT MSVC)
|
|||
# These flags are not available in GCC-4.8.5. Set only when using clang.
|
||||
# Compared against https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Option-Summary.html
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -Wconstant-conversion")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -Wno-invalid-partial-specialization")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -Wno-typedef-redefinition")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -Wno-unknown-warning-option")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user