Skip to content

Commit

Permalink
#1602: handle warning-related options in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 17, 2021
1 parent 970c13d commit 9ce2d0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ option(vt_mimalloc_enabled "Build VT with mimalloc" OFF)
option(vt_mimalloc_static "Build VT with mimalloc using static linking" ON)
option(vt_asan_enabled "Build VT with address sanitizer" OFF)
option(vt_ubsan_enabled "Build VT with undefined behavior sanitizer" OFF)

option(vt_werror_enabled "Build VT with -Werror enabled" OFF)
if (vt_werror_enabled)
enable_cxx_compiler_flag_if_supported("-Werror")
endif()

include(cmake/nvcc_no_deprecated_gpu_targets.cmake)
include(cmake/load_bundled_libraries.cmake)
Expand Down
4 changes: 4 additions & 0 deletions cmake/turn_on_warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ if(NOT hasParent)
enable_cxx_compiler_flag_if_supported("-Wsign-compare")
# Not really a warning, is still diagnostic related..
enable_cxx_compiler_flag_if_supported("-ftemplate-backtrace-limit=100")

if (vt_werror_enabled) # Treat warning as errors
enable_cxx_compiler_flag_if_supported("-Werror")
endif()
endif()

0 comments on commit 9ce2d0e

Please sign in to comment.