From 877683639557451c8a68ff777ebf2c47a0651c3e Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 9 Feb 2025 08:57:39 +0100 Subject: [PATCH] add gnu99 std --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 203925c..b22c3e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "build type") IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug") - SET(CMAKE_C_FLAGS "-Wall -g -fsanitize=address") + SET(CMAKE_C_FLAGS "-std=gnu99 -Wall -g -fsanitize=address") +else() + SET(CMAKE_C_FLAGS "-std=gnu99 -Werror") ENDIF() MESSAGE(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") -- 2.39.5