set(CMAKE_MACOSX_RPATH 1)
+# If not specified on the command line, enable C99 as the default
+# Configuration items that affect the global compiler envirionment standards
+# should be issued before the "project" command.
+if(NOT CMAKE_C_STANDARD)
+ set (CMAKE_C_STANDARD 99) #The C standard whose features are requested to build this target
+endif()
+if(NOT CMAKE_C_STANDARD_REQUIRED)
+ set (CMAKE_C_STANDARD_REQUIRED ON) #Boolean describing whether the value of C_STANDARD is a requirement
+endif()
+if(NOT CMAKE_C_EXTENSIONS)
+ set (CMAKE_C_EXTENSIONS OFF) #Boolean specifying whether compiler specific extensions are requested
+endif()
+set(VALID_C_STANDARDS "99" "11")
+if(NOT CMAKE_C_STANDARD IN_LIST VALID_C_STANDARDS )
+ MESSAGE(FATAL_ERROR "CMAKE_C_STANDARD:STRING=${CMAKE_C_STANDARD} not in know standards list\n ${VALID_C_STANDARDS}")
+endif()
+
project(zlib C)
set(VERSION "1.2.11")
include(CheckCSourceRuns)
include(FeatureSummary)
-# Enable C99
-set (CMAKE_C_STANDARD 99)
-
# make sure we use an appropriate BUILD_TYPE by default, "Release" to be exact
# this should select the maximum generic optimisation on the current platform (i.e. -O3 for gcc/clang)
if(NOT CMAKE_BUILD_TYPE)