summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-03-10 15:08:39 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-03-10 15:08:39 +0200
commit77c184df7c056da7364e606ac977cc2d3cd826ad (patch)
tree9537b2997dd651ae657b88fcf81e4cdf8c94fce7
parent1ec3205703523659226177c229ed3541c5e98a50 (diff)
downloadmariadb-git-77c184df7c056da7364e606ac977cc2d3cd826ad.tar.gz
Explicitly specify that we use the C99 dialect
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
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()