Skip to content

Commit e2c327c

Browse files
committed
feat(build): Make MSVC C4715 warning always a fatal error
1 parent 3829138 commit e2c327c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ if(MSVC)
186186
# /wd4068 (like -Wno-unknown-pragmas): ignore unknown `#pragma` directives
187187
add_compile_options(/wd4244 /wd4068)
188188
189+
# Some warnings which should always be fatal:
190+
#
191+
# /we4715: 'function': not all control paths return a value
192+
add_compile_options(/we4715)
193+
189194
if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
190195
# Enable Security Development Lifecycle checks, which "change security-relevant
191196
# warnings into errors, and set additional secure code-generation features"

0 commit comments

Comments
 (0)