[cmake] Centralize LLVM_ENABLE_WARNINGS option

Configure default value of `LLVM_ENABLE_WARNINGS` in `HandleLLVMOptions.cmake`.

`LLVM_ENABLE_WARNINGS` is documented as ON by default, but `HandleLLVMOptions` assumes the default has been set somewhere else. If it has not been explicitly set, then `HandleLLVMOptions` implicitly uses OFF as a default.

This removes the various `option()` declarations in favor of a single declaration in `HandleLLVMOptions`. This will prevent the unwanted use of `-w` that is mentioned in a couple of the comments.

Reviewed By: DavidTruby, #libunwind, JDevlieghere, compnerd

Differential Revision: https://reviews.llvm.org/D87243

GitOrigin-RevId: b36bdfe5ca0c2b863248f327b03d41516b38dc11
1 file changed
tree: 9f7045bdf4e24140bf73fa6f441b0042f6f631ee
  1. cmake/
  2. docs/
  3. include/
  4. src/
  5. test/
  6. .clang-format
  7. CMakeLists.txt
  8. LICENSE.TXT