Changeset f51aefb for src/driver/cfa.cc


Ignore:
Timestamp:
Nov 1, 2016, 3:18:59 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
84118d8
Parents:
40744af8 (diff), 0afffee (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/driver/cfa.cc

    r40744af8 rf51aefb  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug  6 16:14:55 2016
    13 // Update Count     : 148
     12// Last Modified On : Thu Oct 27 22:19:37 2016
     13// Update Count     : 154
    1414//
    1515
     
    2525using std::endl;
    2626using std::string;
     27using std::to_string;
    2728
    2829
     
    4950
    5051
     52#define str(s) #s
     53
    5154int main( int argc, char *argv[] ) {
    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        string Version( CFA_VERSION_LONG );                                     // current version number from CONFIG
     56        string Major( str( CFA_VERSION_MAJOR ) ), Minor( str( CFA_VERSION_MINOR ) ), Patch( str( CFA_VERSION_PATCH ) );
    6857
    6958        string installincdir( CFA_INCDIR );                                     // fixed location of include files
     
    268257        // add the correct set of flags based on the type of compile this is
    269258
    270         args[nargs] = ( *new string( string("-D__CFA__=") + Major ) ).c_str();
     259        args[nargs] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
    271260        nargs += 1;
    272261        args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
    273262        nargs += 1;
    274         args[nargs] = ( *new string( string("-D__CFA_PATCHLEVEL__=") + Patch ) ).c_str();
     263        args[nargs] = ( *new string( string("-D__CFA_PATCH__=") + Patch ) ).c_str();
    275264        nargs += 1;
    276265        args[nargs] = "-D__CFA__";
Note: See TracChangeset for help on using the changeset viewer.