Changes in src/driver/cfa.cc [47a8d17:35f9114]
- File:
-
- 1 edited
-
src/driver/cfa.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/driver/cfa.cc
r47a8d17 r35f9114 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 25 21:29:48201613 // Update Count : 1 5212 // Last Modified On : Sat Aug 6 16:14:55 2016 13 // Update Count : 148 14 14 // 15 15 … … 25 25 using std::endl; 26 26 using std::string; 27 using std::to_string;28 27 29 28 … … 51 50 52 51 int main( int argc, char *argv[] ) { 53 string Version( CFA_VERSION_LONG ); // current version number from CONFIG 54 string Major( to_string( CFA_VERSION_MAJOR ) ), Minor( to_string( CFA_VERSION_MINOR ) ), Patch( to_string( CFA_VERSION_PATCH ) ); 52 string Version( VERSION ); // current version number from CONFIG 53 string Major( "0" ), Minor( "0" ), Patch( "0" ); // default version numbers 54 55 int posn1 = Version.find( "." ); // find the divider between major and minor version numbers 56 if ( posn1 == -1 ) { // not there ? 57 Major = Version; 58 } else { 59 Major = Version.substr( 0, posn1 ); 60 int posn2 = Version.find( ".", posn1 + 1 ); // find the divider between minor and patch numbers 61 if ( posn2 == -1 ) { // not there ? 62 Minor = Version.substr( posn1 ); 63 } else { 64 Minor = Version.substr( posn1 + 1, posn2 - posn1 - 1 ); 65 Patch = Version.substr( posn2 + 1 ); 66 } // if 67 } // if 55 68 56 69 string installincdir( CFA_INCDIR ); // fixed location of include files … … 255 268 // add the correct set of flags based on the type of compile this is 256 269 257 args[nargs] = ( *new string( string("-D__CFA_ MAJOR__=") + Major ) ).c_str();270 args[nargs] = ( *new string( string("-D__CFA__=") + Major ) ).c_str(); 258 271 nargs += 1; 259 272 args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str(); 260 273 nargs += 1; 261 args[nargs] = ( *new string( string("-D__CFA_PATCH __=") + Patch ) ).c_str();274 args[nargs] = ( *new string( string("-D__CFA_PATCHLEVEL__=") + Patch ) ).c_str(); 262 275 nargs += 1; 263 276 args[nargs] = "-D__CFA__";
Note:
See TracChangeset
for help on using the changeset viewer.