Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Correctly pass warning level to the compiler
Use `add_compile_options ("-W4")` instead of `add_definitions ("-W4")` since
the latter passes a `-W4` argument to `rc.exe` which results in this error:

  fatal error RC1106: invalid option: -4

The same is done for non-MSVC compilers for consistency and to avoid similar
problems.
  • Loading branch information
joankaradimov committed Mar 15, 2022
commit cd04b4f903f3d26a10ef12195a7e422e6ea27c6e
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ if (NOT MSVC)
endif ()

if (NOT MSVC)
add_definitions ("-Wall")
add_compile_options ("-Wall")
else ()
# Show level 4 warnings.
add_definitions ("-W4")
add_compile_options ("-W4")
endif ()

option(UNICODE "Compile with UNICODE support" OFF)
Expand Down