Changeset 14255
- Timestamp:
- 01/15/13 15:18:51 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/os
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/os/dakotaversion.m
r14251 r14255 6 6 7 7 %default 8 DAKOTA_VERSION= 0;8 DAKOTA_VERSION=''; 9 9 10 configfile=[issmdir() '/ externalpackages/dakota/install/include/dakota_config.h'];10 configfile=[issmdir() '/config.h']; 11 11 if ~exist(configfile,'file'), 12 12 error(['File ' configfile ' not found. Dakota has not been configured yet!']); … … 20 20 tline=fgets(fid); 21 21 if ~ischar(tline), break, end 22 if strncmp(tline,'#define PACKAGE_VERSION',23),23 DAKOTA_VERSION=strtrim(strrep(tline(2 5:end),'"',''));22 if strncmp(tline,'#define DAKOTA_VERSION',22), 23 DAKOTA_VERSION=strtrim(strrep(tline(24:end),'"','')); 24 24 end 25 25 end -
issm/trunk-jpl/src/m/os/dakotaversion.py
r14251 r14255 12 12 13 13 #default 14 DAKOTA_VERSION= 014 DAKOTA_VERSION='' 15 15 16 configfile=os.path.join(issmdir(),' externalpackages','dakota','install','include','dakota_config.h')16 configfile=os.path.join(issmdir(),'config.h') 17 17 if not os.path.exists(configfile): 18 18 raise RuntimeError("File '%s' not found. Dakota has not been configured yet!" % configfile) … … 25 25 26 26 for tline in fid: 27 if strncmp(tline,'#define PACKAGE_VERSION',23):28 DAKOTA_VERSION=tline[2 4:].replace('"','').strip()27 if strncmp(tline,'#define DAKOTA_VERSION',22): 28 DAKOTA_VERSION=tline[23:].replace('"','').strip() 29 29 break 30 30
Note:
See TracChangeset
for help on using the changeset viewer.