pytorch/cmake
cyy 9a492fc27f Fix unknown c++ flag detection in CMake (#109000)
Unknown -Wno-XXX flags are still appended to GCC via append_cxx_flag_if_supported  because of the behavior mentioned in GCC document:
```
When an unrecognized warning option is requested (e.g., -Wunknown-warning),
GCC emits a diagnostic stating that the option is not recognized.
However, if the -Wno- form is used, the behavior is slightly different:
no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced.
This allows the use of new -Wno- options with old compilers,
but if something goes wrong, the compiler warns that an unrecognized option is present.
```
This PR tries to fix by detection the flag of the -WXXX form. Unfortunately, third_party/fbgemm/CMakeLists.txt redefines append_cxx_flag_if_supported and our version is overwritten. As a result, we have to re-include utils.cmake to overwrite it again.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/109000
Approved by: https://github.com/malfet
2023-09-11 08:32:07 +00:00
..
External [BC BREAKING] Remove outdated python submodules (#108236) 2023-09-02 06:24:20 +00:00
Modules Fix finding Intel MKL on Windows, as well as LAPACK, cuDNN and cuSPARSELt (#108040) 2023-09-08 14:41:00 +00:00
Modules_CUDA_fix [BE] Remove fast_nvcc tool (#96665) 2023-03-14 03:17:31 +00:00
public Fix unknown c++ flag detection in CMake (#109000) 2023-09-11 08:32:07 +00:00
Allowlist.cmake
BuildVariables.cmake
Caffe2Config.cmake.in remove unused CAFFE2_VERSION macros (#97337) 2023-03-24 16:02:35 +00:00
CheckAbi.cmake remove abi uncertainty and potential abi conflict (#94306) 2023-02-09 09:54:04 +00:00
cmake_uninstall.cmake.in
Codegen.cmake add explicit vectorization for Half dtype on CPU (#96076) 2023-04-03 10:58:37 +00:00
DebugHelper.cmake
Dependencies.cmake [CI] Fix sccaching of nvcc builds (#106811) 2023-08-09 00:25:11 +00:00
FlatBuffers.cmake
GoogleTestPatch.cmake Simplify cmake code (#91546) 2023-02-08 01:05:19 +00:00
IncludeSource.cpp.in
iOS.cmake Refactor ios-build-test workflow to support binary release (#108322) 2023-09-10 19:08:15 +00:00
Metal.cmake [CI] Compile on M1 natively (#95719) 2023-03-01 04:20:42 +00:00
MiscCheck.cmake [BE] Cleanup CMake flag suppressions (#97584) 2023-03-27 18:46:09 +00:00
ProtoBuf.cmake [BE] Cleanup CMake flag suppressions (#97584) 2023-03-27 18:46:09 +00:00
ProtoBufPatch.cmake
Summary.cmake Add Independent Memory Efficient and Flash Attention Build Flags (#107985) 2023-08-28 18:39:18 +00:00
TorchConfig.cmake.in Revert "[Reland] Upgrade NVTX to NVTX3 (#97582)" 2023-08-15 20:55:12 +00:00
TorchConfigVersion.cmake.in
VulkanCodegen.cmake [Vulkan] Remove GLSL Code Gen (#91912) 2023-01-10 20:29:47 +00:00
VulkanDependencies.cmake [Vulkan] Remove GLSL Code Gen (#91912) 2023-01-10 20:29:47 +00:00