/[escript]/branches/escript3047_with_pastix2995/SConstruct
ViewVC logotype

Diff of /branches/escript3047_with_pastix2995/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2300 by gross, Wed Mar 11 08:17:57 2009 UTC revision 2302 by jfenwick, Thu Mar 12 04:40:03 2009 UTC
# Line 700  if env['usedebug']: Line 700  if env['usedebug']:
700  if env['usempi']:  if env['usempi']:
701    remember_list += env.Command(env['libinstall'] + "/Compiled.with.mpi", None, Touch('$TARGET'))    remember_list += env.Command(env['libinstall'] + "/Compiled.with.mpi", None, Touch('$TARGET'))
702    
703  if env['omp_optim'] != '':  if env['useopenmp']:
704    remember_list += env.Command(env['libinstall'] + "/Compiled.with.openmp", None, Touch('$TARGET'))    remember_list += env.Command(env['libinstall'] + "/Compiled.with.openmp", None, Touch('$TARGET'))
705    
706  env.Alias('remember_options', remember_list)  env.Alias('remember_options', remember_list)
# Line 710  env.Alias('remember_options', remember_l Line 710  env.Alias('remember_options', remember_l
710    
711  if not IS_WINDOWS_PLATFORM:  if not IS_WINDOWS_PLATFORM:
712    versionstring="Python "+str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2])    versionstring="Python "+str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2])
713    os.system("echo "+versionstring+" > "+env['libinstall']+"/pyversion")    os.system("echo "+versionstring+" > "+os.path.join(env['libinstall'],"pyversion"))
714    
715    ############## Populate the buildvars file #####################
716    
717    buildvars=open(os.path.join(env['libinstall'],'buildvars'),'w')
718    buildvars.write('python='+str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2])+'\n')
719    
720    # Find the boost version by extracting it from version.hpp
721    boosthpp=open(os.path.join(env['boost_path'],'boost','version.hpp'))
722    boostversion='unknown'
723    try:
724        for line in boosthpp:
725            ver=re.match(r'#define BOOST_VERSION (\d+)',line)
726            if ver:
727                boostversion=ver.group(1)
728    except StopIteration:
729        pass
730    buildvars.write("boost="+boostversion+"\n")
731    buildvars.write("svn_revision="+str(global_revision)+"\n")
732    out="usedebug="
733    if env['usedebug']:
734        out+="y"
735    else:
736        out+="n"
737    out+="\nusempi="
738    if env['usempi']:
739        out+="y"
740    else:
741        out+="n"
742    out+="\nuseopenmp="
743    if env['useopenmp']:
744        out+="y"
745    else:
746        out+="n"
747    buildvars.write(out+"\n")
748    
749    buildvars.close()
750    
751    
752  ############ Targets to build and install libraries ############  ############ Targets to build and install libraries ############
753    

Legend:
Removed from v.2300  
changed lines
  Added in v.2302

  ViewVC Help
Powered by ViewVC 1.1.26