diff options
-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') |