File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,14 @@ function(boost_add_warnings target level)
1414 if (NOT level IN_LIST allowed_levels)
1515 message (FATAL_ERROR "${level} is not a valid warning level (${allowed_levels} )" )
1616 endif ()
17- if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
17+ if (MSVC )
18+ set (warn_off /W0)
19+ set (warn_on /W3)
20+ foreach (_lvl IN ITEMS all extra pedantic)
21+ set (warn_${_lvl} /W4)
22+ endforeach ()
23+ set (werror /WX)
24+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
1825 set (warn_off -w)
1926 set (warn_on -Wall)
2027 set (warn_all -Wall)
@@ -27,13 +34,6 @@ function(boost_add_warnings target level)
2734 set (warn_${_lvl} -w1)
2835 endforeach ()
2936 set (werror "" )
30- elseif (MSVC )
31- set (warn_off /W0)
32- set (warn_on /W3)
33- foreach (_lvl IN ITEMS all extra pedantic)
34- set (warn_${_lvl} /W4)
35- endforeach ()
36- set (werror /WX)
3737 endif ()
3838 target_compile_options (${target} PRIVATE ${warn_${level}} )
3939 if (warningsAsErrors)
You can’t perform that action at this time.
0 commit comments