Skip to content

Commit

Permalink
Add CMake option for 'ENABLE_ALL_WARNINGS' to match Makefile. (#11218)
Browse files Browse the repository at this point in the history
Summary:
Fixes #11217

### Changelog
1. Add CMake option 'ENABLE_ALL_WARNINGS' to align pure CMake execution with Makefile

Pull Request resolved: #11218

Reviewed By: xiaoxmeng

Differential Revision: D64696632

Pulled By: kgpai

fbshipit-source-id: 7292c656e512dfe5d70d99acca7a505ee4b00958
  • Loading branch information
JackyWoo authored and facebook-github-bot committed Oct 28, 2024
1 parent 5180b68 commit 05cc23f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ option(
This will override other build options."
OFF)
option(VELOX_MONO_LIBRARY "Build single unified library." OFF)
option(ENABLE_ALL_WARNINGS "Enable -Wall and -Wextra compiler warnings." ON)

# option() always creates a BOOL variable so we have to use a normal cache
# variable with STRING type for this option.
Expand Down Expand Up @@ -335,7 +336,7 @@ if("${MAX_LINK_JOBS}")
set(CMAKE_JOB_POOL_LINK link_job_pool)
endif()

if("${ENABLE_ALL_WARNINGS}")
if(ENABLE_ALL_WARNINGS)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(KNOWN_COMPILER_SPECIFIC_WARNINGS
"-Wno-range-loop-analysis \
Expand Down

0 comments on commit 05cc23f

Please sign in to comment.