diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-21 16:45:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-21 16:46:57 +0300 |
commit | 069adb8104fb088310b7cb4088414c9a997f7716 (patch) | |
tree | e88fe4c8ec68bb3d16960348f3936f1c0946ba8b /SConstruct | |
parent | 25bedeca9b84c256e8a50b322fa10e7e598805e5 (diff) |
SCons: Fix for missing avx and avx2 cycles kernels
SCons was checking for a particular compiler version to see whether compiler
flags are available or not, but compiler ID was only set on OSX.
Now it should be set on Linux as well.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index c5e1d660719..a32fff9b6b3 100644 --- a/SConstruct +++ b/SConstruct @@ -470,6 +470,14 @@ if env['OURPLATFORM']=='darwin': ################### End Automatic configuration for OSX ################## ############################################################################# +if env['OURPLATFORM'] == 'linux' and not env['C_COMPILER_ID']: + command = ["%s"%env['CC'], "--version"] + line = btools.get_command_output(command) + if line.startswith('gcc'): + env['C_COMPILER_ID'] = 'gcc' + elif 'clang' in line[0]: + env['C_COMPILER_ID'] = 'clang' + if env['WITH_BF_OPENMP'] == 1: if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): env['CCFLAGS'].append('/openmp') |