Skip to content

Commit

Permalink
Add proper compilation flags for MSVC and WSL in CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
grassator committed Aug 11, 2023
1 parent 0718a67 commit accb382
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ set(CMAKE_C_STANDARD 23)

include_directories(.)

if (MSVC)
add_compile_options(
/Wall /wd4456 /wd4711 /wd4068 /wd4710 /wd4204 /wd4200 /wd4221 /wd4057 /wd4996 /wd6334
/wd4255 /wd4505 /wd4201 /wd4668 /wd4820 /wd5045 /wd4100 /wd4214 /wd5105 /wd4191 /wd4061
/D UNICODE /D _UNICODE)
else()
add_compile_options(-Wno-incompatible-pointer-types)
endif()

add_executable(meta
meta.c)

Expand Down

0 comments on commit accb382

Please sign in to comment.