Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2015-11-22 19:12:54 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2015-11-23 00:31:22 +0300
commit4ff0126e890cebe16b4eec5c1b2bc507346b4f24 (patch)
tree9d88a5f275928c5d9e393a9fdfe6dccbdcb7ce83 /SConstruct
parentdb1f0e36163037c94857626be8ca20dd9ae5b168 (diff)
C99 is now the C standard for all our C code.
The main new feature is mixed variable declarations and code, which can help reduce uninitialized variables or accidental variable reuse. Due to incomplete C99 support in VS 2013, variable length arrays are not supported, BLI_array_alloca must still be used. The header <tgmath.h> is also not supported. Differential Revision: https://developer.blender.org/D1631
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index ebd9cd1ec90..29f539236c2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -498,6 +498,13 @@ if env['WITH_BF_CPP11']:
else:
env['CXXFLAGS'].append('-std=c++11')
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ # Visual Studio has all standards it supports available by default
+ pass
+else:
+ # Use C99 + GNU extensions, works with GCC, Clang, ICC
+ env['CFLAGS'].append('-std=gnu99')
+
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):