@@ -95,24 +95,12 @@ include_directories(src)
9595message (STATUS "Compiler ID: " ${CMAKE_CXX_COMPILER_ID} )
9696
9797if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
98- # /we #### - treat warning as error
9998 # /wd #### - Disable warning
100- # /w3 #### - set warning to level 3
101- add_compile_options ("/Wall" ) # Enable all warnings
102- add_compile_options ("/w3 5038" ) # Data member will be initialized after [other] data member
99+ # /we #### - treat warning as error
100+ add_compile_options ("/W4" ) # Enable level-4 warnings
103101 add_compile_options ("/we 4265" ) # Class has virtual functions, but its non-trivial destructor is not virtual
104102 add_compile_options ("/we 5204" ) # Class has virtual functions, but its trivial destructor is not virtual
105103 add_compile_options ("/wd 4100" ) # unreferenced formal parameter
106- add_compile_options ("/wd 4365" ) # conversion from 'size_t' to 'const int __int64', signed/unsigned mismatch
107- add_compile_options ("/wd 4514" ) # Ureferenced inline function has been removed
108- add_compile_options ("/wd 4626" ) # assignment operator was implicitly defined as deleted
109- add_compile_options ("/wd 4710" ) # Function not inlined
110- add_compile_options ("/wd 4711" ) # Function selected for automatic inline expansion
111- add_compile_options ("/wd 4820" ) # N bytes padding added after data member
112- add_compile_options ("/wd 5027" ) # move assignment operator was implicitly defined as deleted
113- add_compile_options ("/wd 5045" ) # will insert Spectre mitigation for memory load if /Qspectre switch specified
114- add_compile_options ("/wd 5219" ) # implicit conversion from 'unsigned __int64' to 'double', possible loss of data
115- add_compile_options ("/wd 5267" ) # definition of implicit assignment operator is deprecated; has user-provided dtor
116104elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
117105 add_compile_options (-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
118106 add_compile_options (-Wreorder) # Data member will be initialized after [other] data member
0 commit comments