Enable -Werror=pedantic on torch targets (#130319)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/130319
Approved by: https://github.com/ezyang
This commit is contained in:
cyy
2024-07-11 12:27:32 +00:00
committed by PyTorch MergeBot
parent 5db9bd467e
commit c5b66c3fe1

View File

@ -392,7 +392,9 @@ function(torch_compile_options libname)
-Werror=inconsistent-missing-override
-Werror=inconsistent-missing-destructor-override
-Werror=unused-function
-Werror=unused-variable)
-Werror=unused-variable
-Werror=pedantic
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
list(APPEND private_compile_options -Werror=unused-but-set-variable)
endif()