Skip to content

Commit 747fac0

Browse files
committed
bumped to Visual Studio warning level 4
1 parent be065dd commit 747fac0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
4040
set_source_files_properties(test.cpp PROPERTIES COMPILE_FLAGS -Wno-multichar)
4141
elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
4242
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
43-
# TODO: bump warning level
44-
#add_compile_options(/W4) # Warning Level
45-
# TODO: enable warning
43+
44+
add_compile_options(/W4) # Warning Level
45+
46+
add_compile_options(/wd4127) # warning C4127: conditional expression is constant
47+
add_compile_options(/wd4244) # warning C4244: 'x': conversion from 'int' to 'char', possible loss of data
4648
add_compile_options(/wd4267) # warning C4267: '...': conversion from 'size_t' to 'unsigned int', possible loss of data
49+
add_compile_options(/wd4706) # warning C4706: assignment within conditional expression
4750
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
4851
add_compile_options(-Weverything)
4952

0 commit comments

Comments
 (0)