Skip to content

Commit

Permalink
build: Use /W4 instead of /Wall on MSVC
Browse files Browse the repository at this point in the history
The problem is that /Wall is too much verbose on Windows, giving us a
lot of unhelpful feedbacks.

Now, the official VC++ manual recommends to use /W4. Let's just switch
to it.

> We recommend that you use this option to provide lint-like warnings.
> For a new project, it may be best to use /W4 in all compilations;
> this will ensure the fewest possible hard-to-find code defects.
>
> https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level

Signed-off-by: Fujimoto Seiji <[email protected]>
  • Loading branch information
Fujimoto Seiji authored and edsiper committed Jan 7, 2019
1 parent b75047a commit 496c2aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(chunk-io)
# CFLAGS
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 ")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall ")
endif()
Expand Down

0 comments on commit 496c2aa

Please sign in to comment.