/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 3617 by caltinay, Mon Sep 19 04:47:53 2011 UTC revision 3618 by jfenwick, Fri Sep 30 04:07:09 2011 UTC
# Line 47  if not os.path.isfile(options_file): Line 47  if not os.path.isfile(options_file):
47  ############################### Build options ################################  ############################### Build options ################################
48    
49  default_prefix='/usr'  default_prefix='/usr'
50  mpi_flavours=('none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')  mpi_flavours=('no', 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')
51  lapack_flavours=('none', 'clapack', 'mkl')  lapack_flavours=('none', 'clapack', 'mkl')
52    
53  vars = Variables(options_file, ARGUMENTS)  vars = Variables(options_file, ARGUMENTS)
# Line 125  vars.AddVariables( Line 125  vars.AddVariables(
125    ('build_shared', 'Build dynamic libraries only', False),    ('build_shared', 'Build dynamic libraries only', False),
126    ('sys_libs', 'Extra libraries to link with', []),    ('sys_libs', 'Extra libraries to link with', []),
127    ('escript_opts_version', 'Version of options file (do not specify on command line)'),    ('escript_opts_version', 'Version of options file (do not specify on command line)'),
128      ('SVN_VERSION', 'Do not use from options file', -2),
129  )  )
130    
131  ##################### Create environment and help text #######################  ##################### Create environment and help text #######################
# Line 283  env.Append(CCFLAGS = env['cc_flags']) Line 284  env.Append(CCFLAGS = env['cc_flags'])
284  # add system libraries  # add system libraries
285  env.AppendUnique(LIBS = env['sys_libs'])  env.AppendUnique(LIBS = env['sys_libs'])
286    
287  # Get the global Subversion revision number for the getVersion() method  
288  try:  global_revision=ARGUMENTS.get('SVN_VERSION', None)
289    if global_revision:
290        global_revision = re.sub(':.*', '', global_revision)
291        global_revision = re.sub('[^0-9]', '', global_revision)
292        if global_revision == '': global_revision='-2'
293    else:
294      # Get the global Subversion revision number for the getVersion() method
295      try:
296      global_revision = os.popen('svnversion -n .').read()      global_revision = os.popen('svnversion -n .').read()
297      global_revision = re.sub(':.*', '', global_revision)      global_revision = re.sub(':.*', '', global_revision)
298      global_revision = re.sub('[^0-9]', '', global_revision)      global_revision = re.sub('[^0-9]', '', global_revision)
299      if global_revision == '': global_revision='-2'      if global_revision == '': global_revision='-2'
300  except:    except:
301      global_revision = '-1'      global_revision = '-1'
302  env['svn_revision']=global_revision  env['svn_revision']=global_revision
303  env.Append(CPPDEFINES=['SVN_VERSION='+global_revision])  env.Append(CPPDEFINES=['SVN_VERSION='+global_revision])
# Line 557  if env['visit']: Line 565  if env['visit']:
565    
566  ######## MPI (optional)  ######## MPI (optional)
567    
568    if env['mpi']=='no':
569        env['mpi']='none'
570    
571  env['usempi'] = env['mpi']!='none'  env['usempi'] = env['mpi']!='none'
572  mpi_inc_path=''  mpi_inc_path=''
573  mpi_lib_path=''  mpi_lib_path=''

Legend:
Removed from v.3617  
changed lines
  Added in v.3618

  ViewVC Help
Powered by ViewVC 1.1.26