[Bf-blender-cvs] [726614a] depsgraph_refactor: Depsgraph: Fix compilation with scons and compositor enabled
Sergey Sharybin
noreply at git.blender.org
Sat Nov 8 18:43:49 CET 2014
Commit: 726614a5026203fe247e6cc13eb10dc975ce74fa
Author: Sergey Sharybin
Date: Sat Nov 8 22:43:02 2014 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB726614a5026203fe247e6cc13eb10dc975ce74fa
Depsgraph: Fix compilation with scons and compositor enabled
===================================================================
M CMakeLists.txt
M build_files/scons/config/linux-config.py
M source/blender/depsgraph/SConscript
M source/blender/editors/space_info/SConscript
M source/gameengine/GamePlayer/ghost/SConscript
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc49bb0..c2ed1a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2530,9 +2530,9 @@ endif()
# Enable C++11
if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -U__STRICT_ANSI__")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -U__STRICT_ANSI__")
endif()
# Include warnings first, so its possible to disable them with user defined flags
diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py
index d460ece..d0556d3 100644
--- a/build_files/scons/config/linux-config.py
+++ b/build_files/scons/config/linux-config.py
@@ -235,7 +235,7 @@ CXXFLAGS = []
CPPFLAGS = []
# g++ 4.6, only needed for bullet
-CXXFLAGS += ['-fpermissive']
+CXXFLAGS += ['-fpermissive', '-std=c++11', '-U__STRICT_ANSI__']
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
diff --git a/source/blender/depsgraph/SConscript b/source/blender/depsgraph/SConscript
index 3dfce1f..3a03533 100644
--- a/source/blender/depsgraph/SConscript
+++ b/source/blender/depsgraph/SConscript
@@ -25,8 +25,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-from unordered_map import test_unordered_map
-
Import('env')
sources = env.Glob('intern/*.cpp') + env.Glob('util/*.cpp')
@@ -35,13 +33,15 @@ incs = [
'.',
'./intern',
'./util',
+ '#/intern/atomic',
'#/intern/guardedalloc',
'../bmesh',
'../blenlib',
'../blenkernel',
'../makesdna',
'../makesrna',
- '../modifiers',
+ '../modifiers',
+ '../windowmanager',
]
defs = []
@@ -50,29 +50,19 @@ incs.append(env['BF_BOOST_INC'])
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
incs.append(env['BF_PTHREADS_INC'])
-
-def define_unordered_map(conf):
- found, namespace, include_prefix = test_unordered_map(conf)
- if found:
- if not include_prefix:
- if namespace == 'std':
- defs.append('DEG_STD_UNORDERED_MAP')
- return True
- elif namespace == 'std::tr1':
- defs.append('DEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE')
- return True
- else:
- if namespace == 'std::tr1':
- defs.append('DEG_TR1_UNORDERED_MAP')
- return True
- return False
-conf = Configure(env)
-if not define_unordered_map(conf):
+if env['WITH_UNORDERED_MAP_SUPPORT']:
+ if env['UNORDERED_MAP_HEADER'] == 'unordered_map':
+ if env['UNORDERED_MAP_NAMESPACE'] == 'std':
+ defs.append('DEG_STD_UNORDERED_MAP')
+ elif env['UNORDERED_MAP_NAMESPACE'] == 'std::tr1':
+ defs.append('DEG_STD_UNORDERED_MAP_IN_TR1_NAMESPACE')
+ elif env['UNORDERED_MAP_NAMESPACE'] == 'std::tr1':
+ defs.append('DEG_TR1_UNORDERED_MAP')
+else:
print("-- Replacing unordered_map/set with map/set (warning: slower!)")
defs.append('DEG_NO_UNORDERED_MAP')
-env = conf.Finish()
env.BlenderLib(libname='bf_depsgraph', sources=sources,
includes=incs, defines=defs,
diff --git a/source/blender/editors/space_info/SConscript b/source/blender/editors/space_info/SConscript
index 3789408..108ce58 100644
--- a/source/blender/editors/space_info/SConscript
+++ b/source/blender/editors/space_info/SConscript
@@ -39,6 +39,7 @@ incs = [
'../../blenlib',
'../../blenloader',
'../../bmesh',
+ '../../depsgraph',
'../../gpu',
'../../imbuf',
'../../makesdna',
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index d4c3188..6ef2251 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -55,6 +55,7 @@ incs = [
'#source/blender/blenkernel',
'#source/blender',
'#source/blender/include',
+ '#source/blender/depsgraph',
'#source/blender/makesdna',
'#source/blender/makesrna',
'#source/gameengine/Rasterizer',
More information about the Bf-blender-cvs
mailing list