diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-17 14:32:17 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-17 14:32:17 +0400 |
commit | 7a85ad51bfc302748b912ec6b69f647b6fd131b7 (patch) | |
tree | ffc3ffa64a49d47b05283527b94273d882ececdf | |
parent | 62f440a0b2d9a074de24ef0891d03c536f25cc1a (diff) |
Compilation error when using mingw+scons
Error was caused by boost library (which doesn't seem to be working with Cycles too
when compiling with mingw). Switched mingw to use TR1 unordered collections. Also,
there was re-declaration of strcasecmp when mingw is used.
Additional changes are related on using own process spawning when BF_TOOLSET is set to
mingw. Seems to be working fine now (i've got too long command line error) and no
warning are supressing now (as it was told in comment for commented own process spawning).
-rw-r--r-- | SConstruct | 5 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 10 | ||||
-rw-r--r-- | extern/carve/SConscript | 3 | ||||
-rwxr-xr-x | extern/carve/include/carve/win32.h | 2 | ||||
-rw-r--r-- | intern/boolop/SConscript | 3 |
5 files changed, 13 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct index ee43015cf6e..0dd59add019 100644 --- a/SConstruct +++ b/SConstruct @@ -147,9 +147,8 @@ if toolset: env.Tool('mstoolkit', [toolpath]) else: env = BlenderEnvironment(tools=[toolset], ENV = os.environ) - # xxx commented out, as was supressing warnings under mingw.. - #if env: - # btools.SetupSpawn(env) + if env: + btools.SetupSpawn(env) else: if bitness==64 and platform=='win32': env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64') diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 296d518596a..a71ab04b888 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -222,15 +222,15 @@ class ourSpawn: newargs = string.join(args[1:], ' ') cmdline = cmd + " " + newargs startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + #startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False) data, err = proc.communicate() rv = proc.wait() - if rv: - print "=====" - print err - print "=====" + if data: + print(data) + if err: + print(err) return rv def SetupSpawn( env ): diff --git a/extern/carve/SConscript b/extern/carve/SConscript index 4a87b825186..e2f3c814e2e 100644 --- a/extern/carve/SConscript +++ b/extern/carve/SConscript @@ -14,7 +14,8 @@ incs = ['include'] if env['WITH_BF_BOOST']: if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'): # Boost is setting as preferred collections library in the Carve code when using MSVC compiler - defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') + if env['OURPLATFORM'] != 'win32-mingw': + defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') defs.append('CARVE_SYSTEM_BOOST') incs.append(env['BF_BOOST_INC']) diff --git a/extern/carve/include/carve/win32.h b/extern/carve/include/carve/win32.h index b73c9535f52..5f8ce3b3bf6 100755 --- a/extern/carve/include/carve/win32.h +++ b/extern/carve/include/carve/win32.h @@ -8,9 +8,11 @@ #include <string.h> #include <stdlib.h> +#if !defined(__MINGW32__) inline int strcasecmp(const char *a, const char *b) { return _stricmp(a,b); } +#endif inline void srandom(unsigned long input) { srand(input); diff --git a/intern/boolop/SConscript b/intern/boolop/SConscript index 4012b0fca39..0efed532cb9 100644 --- a/intern/boolop/SConscript +++ b/intern/boolop/SConscript @@ -17,7 +17,8 @@ else: if env['WITH_BF_BOOST']: if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'): # Boost is setting as preferred collections library in the Carve code when using MSVC compiler - defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') + if env['OURPLATFORM'] != 'win32-mingw': + defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS') defs.append('CARVE_SYSTEM_BOOST') incs += ' ' + env['BF_BOOST_INC'] |