[CMakeLists.txt] Enforce C89; [examples/example6.c] Conform to C89; [miniz_zip.c] Use lowercase <windows.h>

This commit is contained in:
Samuel Marks
2021-11-10 21:59:32 -05:00
parent ca1a779ee1
commit e841503cad
3 changed files with 28 additions and 16 deletions

View File

@@ -11,6 +11,16 @@ if(CMAKE_MINOR_VERSION LESS 12)
# see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
else()
project(miniz C)
set(CMAKE_C_STANDARD 90)
set(CMAKE_VERBOSE_MAKEFILE ON)
# set(CMAKE_C_VISIBILITY_PRESET hidden)
# set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
if (MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX /Zi /permissive-")
else ()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow -Wformat=2 -Wall -Wno-overlength-strings -pedantic")
endif ()
endif()
set(MINIZ_API_VERSION 2)