Skip to content

fix: add CMake warning infrastructure (opt-in strict compiler warnings)#4932

Open
maxwbuckley wants to merge 1 commit intofacebookresearch:mainfrom
maxwbuckley:fix/warnings-cmake-infra
Open

fix: add CMake warning infrastructure (opt-in strict compiler warnings)#4932
maxwbuckley wants to merge 1 commit intofacebookresearch:mainfrom
maxwbuckley:fix/warnings-cmake-infra

Conversation

@maxwbuckley
Copy link
Copy Markdown
Contributor

Summary

  • Add configurable compiler warning infrastructure (cmake/StrictCompilerWarnings.cmake) with 3 warning levels (basic, standard, strict) and optional -Werror support
  • Apply faiss_add_warnings() to all build targets via CMakeLists.txt updates
  • Add CI workflow job for warning-level builds
  • Document warning levels in CONTRIBUTING.md

Default is level 0 (off) so this is fully opt-in and does not break existing builds.

Part 1/13 of the compiler warnings cleanup (split from #4810 per maintainer request).

Test plan

  • Default build (level 0) unchanged
  • No functional changes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Mar 17, 2026

@alibeklfc has imported this pull request. If you are a Meta employee, you can view this in D96995151.

@maxwbuckley maxwbuckley force-pushed the fix/warnings-cmake-infra branch from 305b422 to eed281b Compare March 18, 2026 10:01
Mechanical fixes for compiler warnings found with -Wall -Wextra -Wshadow.
No functional changes — only variable renames, unused parameter annotations,
signed/unsigned casts, and [[fallthrough]] attributes.

Part 1/13 of the compiler warnings cleanup (split from PR facebookresearch#4810).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant