Set C99 as the explicit, not implicit, build standard.

pull/2558/merge
Roger A. Light 3 years ago
parent 2a95ec73ba
commit 87cb3250cd

@ -13,6 +13,9 @@ project(mosquitto
LANGUAGES C CXX LANGUAGES C CXX
) )
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
add_definitions (-DCMAKE -DVERSION=\"${VERSION}\") add_definitions (-DCMAKE -DVERSION=\"${VERSION}\")

@ -160,6 +160,7 @@ Build:
- Increased CMake minimal required version to 3.14, which is required for the - Increased CMake minimal required version to 3.14, which is required for the
preinstalled SQLite3 find module. preinstalled SQLite3 find module.
- Add an CMake option `WITH_LTO` to enable/disable link time optimization. - Add an CMake option `WITH_LTO` to enable/disable link time optimization.
- Set C99 as the explicit, rather than implicit, build standard.
2.0.15 - 2022-08-16 2.0.15 - 2022-08-16

@ -164,7 +164,7 @@ ifeq ($(UNAME),SunOS)
CFLAGS?=-Wall -ggdb -O2 CFLAGS?=-Wall -ggdb -O2
endif endif
else else
CFLAGS?=-Wall -ggdb -O3 -Wconversion -Wextra CFLAGS?=-Wall -ggdb -O3 -Wconversion -Wextra -std=gnu99
endif endif
STATIC_LIB_DEPS:= STATIC_LIB_DEPS:=

Loading…
Cancel
Save