Skip to content

Commit

Permalink
[native] Fix location of TREAT_WARNINGS_AS_ERRORS
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Jun 10, 2024
1 parent e7dc3a5 commit 0504500
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions presto-native-execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
message("Appending CMAKE_CXX_FLAGS with ${SCRIPT_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}")
if("${TREAT_WARNINGS_AS_ERRORS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()

# Known warnings that are benign can be disabled.
set(DISABLED_WARNINGS
Expand Down Expand Up @@ -209,4 +206,10 @@ else()
endif()
set(CMAKE_JOB_POOL_LINK presto_link_job_pool)

# Adding this down here prevents warnings in dependencies from stopping the
# build
if("${TREAT_WARNINGS_AS_ERRORS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()

add_subdirectory(presto_cpp)

0 comments on commit 0504500

Please sign in to comment.