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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-02-09 20:23:21 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-03-13 14:47:40 +0300
commit63ea8dd156b39eb57b73a953f5ac9ae54b7a447a (patch)
tree768a5dbb95f7a4b50f7f9e857beedd27f3c0175b /SConstruct
parent278871db5bdef68cf128dd01fb9c722db55054e3 (diff)
Initial compilation support with C++11 featureset enabled
This commit makes some preliminary fixes and tweaks aimed to make blender compilable with C++11 feature set. This includes: - Build system attribute to enable C++11 featureset. It's for sure default OFF, but easy to enable to have a play around with it and make sure all the stuff is compilable before we go C++11 for real. - Changes in Compositor to use non-named cl_int structure fields. This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL does not use named fields in this case. - Changes to TYPE_CHECK() related on lack of typeof() in C++11 This uses decltype() instead with some trickery to make sure returned type is not a reference. - Changes for auto_ptr in Freestyle This actually conditionally switches between auto_ptr and unique_ptr since auto_ptr is deprecated in C++11. Seems to be not strictly needed but still nice to be ready for such an update anyway/ This all based on changes form depsgraph_refactor branch apart from the weird changes which were made in order to support MinGW compilation. Those parts of change would need to be carefully reviewed again after official move to gcc49 in MinGW. Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and likely needs some more tweaks. Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3 Differential Revision: https://developer.blender.org/D1089
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 7305edfe036..00a95b0114b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -480,6 +480,13 @@ if env['WITH_BF_OPENMP'] == 1:
else:
env.Append(CCFLAGS=['-fopenmp'])
+if env['WITH_BF_CPP11']:
+ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ # Nothing special is needed, C++11 features are available by default.
+ pass
+ else:
+ env['CXXFLAGS'].append('-std=c++11')
+
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):