From 77c184df7c056da7364e606ac977cc2d3cd826ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 10 Mar 2022 15:08:39 +0200 Subject: Explicitly specify that we use the C99 dialect --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88a0d64e6de..6a135b0f8e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (c) 2006, 2017, Oracle and/or its affiliates. -# Copyright (c) 2008, 2021, MariaDB Corporation. +# Copyright (c) 2008, 2022, MariaDB Corporation. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -83,9 +83,11 @@ SET(MYSQL_PROJECT_NAME_DOCSTRING "MySQL project name") IF(CMAKE_VERSION VERSION_LESS "3.1") IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") ENDIF() ELSE() + SET(CMAKE_C_STANDARD 99) SET(CMAKE_CXX_STANDARD 11) ENDIF() -- cgit v1.2.1