summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-23 00:35:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-23 00:35:45 +0200
commit163c717dec73df7a907821cfb092a2ab6c62286a (patch)
tree765e54ffa0c97ee517632a782e08c5a342f09705
parent110b699b279359c0466ba14b78c0d65e8dba0b1b (diff)
cmake/mingw-w64: switch to -std=c11 for pure C mode
-rw-r--r--cmake/mingw-w64.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index 96669e2a..5589aa2f 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -42,8 +42,9 @@ set(lto "-flto -fuse-linker-plugin -flto-compression-level=9 -flto-partition=non
set(bloat "-fno-exceptions -fno-rtti")
set(sections "-ffunction-sections -fdata-sections")
-set(_CFLAGS "-fvisibility=hidden -pipe")
-set(_CXXFLAGS "${bloat} ${_CFLAGS} -std=c++11")
+set(ccflags-common "-fvisibility=hidden -pipe")
+set(_CXXFLAGS "${bloat} ${ccflags-common} -std=c++11")
+set(_CFLAGS "${ccflags-common} -std=c11")
set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto} ${sections}")
set(_CFLAGS_DEBUG "-g -O0 -fstack-protector-strong")
set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}")