Changeset 14255


Ignore:
Timestamp:
01/15/13 15:18:51 (12 years ago)
Author:
jschierm
Message:

CHG: get DAKOTA_VERSION from config.h, rather than from externalpackage/dakota.

Location:
issm/trunk-jpl/src/m/os
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/os/dakotaversion.m

    r14251 r14255  
    66
    77%default
    8 DAKOTA_VERSION=0;
     8DAKOTA_VERSION='';
    99
    10 configfile=[issmdir() '/externalpackages/dakota/install/include/dakota_config.h'];
     10configfile=[issmdir() '/config.h'];
    1111if ~exist(configfile,'file'),
    1212        error(['File ' configfile ' not found. Dakota has not been configured yet!']);
     
    2020        tline=fgets(fid);
    2121        if ~ischar(tline), break, end
    22         if  strncmp(tline,'#define PACKAGE_VERSION',23),
    23                 DAKOTA_VERSION=strtrim(strrep(tline(25:end),'"',''));
     22        if  strncmp(tline,'#define DAKOTA_VERSION',22),
     23                DAKOTA_VERSION=strtrim(strrep(tline(24:end),'"',''));
    2424        end
    2525end
  • issm/trunk-jpl/src/m/os/dakotaversion.py

    r14251 r14255  
    1212
    1313        #default
    14         DAKOTA_VERSION=0
     14        DAKOTA_VERSION=''
    1515
    16         configfile=os.path.join(issmdir(),'externalpackages','dakota','install','include','dakota_config.h')
     16        configfile=os.path.join(issmdir(),'config.h')
    1717        if not os.path.exists(configfile):
    1818                raise RuntimeError("File '%s' not found. Dakota has not been configured yet!" % configfile)
     
    2525
    2626        for tline in fid:
    27                 if strncmp(tline,'#define PACKAGE_VERSION',23):
    28                         DAKOTA_VERSION=tline[24:].replace('"','').strip()
     27                if strncmp(tline,'#define DAKOTA_VERSION',22):
     28                        DAKOTA_VERSION=tline[23:].replace('"','').strip()
    2929                        break
    3030
Note: See TracChangeset for help on using the changeset viewer.