From a3d01760878d0ef51c4346e5f0364d153b628d5f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 24 Feb 2014 03:27:32 +0000 Subject: [PATCH] [SCons] Ensure that 'compilerOpt' is always defined --- interfaces/cython/SConscript | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/interfaces/cython/SConscript b/interfaces/cython/SConscript index 48cf96794..768524e99 100644 --- a/interfaces/cython/SConscript +++ b/interfaces/cython/SConscript @@ -114,6 +114,7 @@ localenv['py_libdirs'] = repr([x for x in libDirs if x]) # unless otherwise specified localenv['py_extra_compiler_args'] = repr([]) localenv['py_extra_link_args'] = repr([]) +compilerOpt = '' if localenv['OS'] == 'Windows': if env['CC'] == 'cl': flags = ['/EHsc'] @@ -122,11 +123,9 @@ if localenv['OS'] == 'Windows': localenv['py_extra_link_args'] = repr(['/DEBUG']) compilerOpt = ' --compiler=msvc' localenv['py_extra_compiler_args'] = repr(flags) - - elif env['CC'] == 'gcc': + elif 'gcc' in env['CC']: compilerOpt = ' --compiler=mingw32' else: - compilerOpt = '' if '-fprofile-arcs' in localenv['CCFLAGS']: localenv['py_extra_compiler_args'] = repr(['-fprofile-arcs', '-ftest-coverage']) localenv['py_extra_link_args'] = repr(['-fprofile-arcs', '-ftest-coverage'])