diff -r 242839c6d27d -r c5b89d16497a SConstruct --- a/SConstruct Thu Apr 10 23:20:36 2008 +0200 +++ b/SConstruct Fri Apr 11 00:13:59 2008 +0200 @@ -47,9 +47,6 @@ opt.Save('.optioncache', env) Help(opt.GenerateHelpText(env)) -if env['intelc']: - Tool("intelc")(env) - platform = 'unknown' def CheckPlatform(context): global platform @@ -73,11 +70,16 @@ context.Result(cpu) return True +intelc = Tool("intelc").exists(env) def CheckIntelC(context): global intelc context.Message('Checking for Intel C++ Compiler... ') - intelc = "intelc" in env['TOOLS'] - context.Result(intelc) + if intelc: + testenv = Environment() + Tool("intelc").generate(testenv) + context.Result(str(testenv['INTEL_C_COMPILER_VERSION']/10.)) + else: + context.Result(intelc) return intelc def CheckGCC(context): @@ -101,7 +103,9 @@ conf.CheckIntelC() env = conf.Finish() -if intelc: + +if intelc and env['intelc']: + Tool("intelc").generate(env) cc = 'intelc' elif gcc: cc = 'gcc' @@ -118,16 +122,17 @@ cpu_flags += '-msse3 -mfpmath=sse ' cpu_flags += env['flags'] -if intelc: +if cc == 'intelc': env.Append(CCFLAGS="-O3 -w1 " + cpu_flags) -elif gcc: +elif cc == 'gcc': env.Append(CCFLAGS="-O3 -Wall -pipe " + cpu_flags) # CCFLAGS= -fno-strict-aliasing else: print "No supported compiler found." Exit(1) -print "Additional compiler flags: " + cpu_flags +print "Using compiler: " + cc +print "Additional flags: " + cpu_flags # pthread if env['PLATFORM'] == 'win32': @@ -146,7 +151,7 @@ SConscript('models/SConscript') env.Alias('docs', Command('docs/html', [], 'doxygen')) -env.Clean('docs', ['docs/html', 'docs/latex']) +env.Clean('docs', ['docs/html']) env.Alias('no-docs', ['libs', 'demos', 'models']) env.Alias('no-download', ['libs', 'demos', 'local-models'])