Changeset 2796 in Sophya


Ignore:
Timestamp:
Jun 3, 2005, 4:54:59 PM (20 years ago)
Author:
ansari
Message:

Remplacement is.getline(...) par getline(istream,string) - CxxCompilerLinker: ajout flag -pthread pour cxx et commandes pour icc (Intel) - Reza 3 Juin 2005

Location:
trunk/SophyaLib/SysTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/commander.cc

    r2779 r2796  
    178178  string line;
    179179  while (!is.eof()) {
     180    /* Reza, Juin 2005 : Remplace par getline(istream, string) - plus sur
     181       is.getline(buff, 256); line += buff;  */
    180182    rcc = 0;
    181     is.clear();
    182     is.getline(buff, 256);
    183     line += buff; 
    184     if (is.good()) {
     183    line = "";
     184    getline(is,line);
     185    if (is.good() || is.eof()) {
    185186      rcc = ExecuteOnce(line);
    186       line = "";
    187     }
    188     if (rcc == CMD_BREAKEXE_RC)  return rcc;
    189     else if (rcc == CMD_BREAK_RC)  break;
     187      if (rcc == CMD_BREAKEXE_RC)  return rcc;
     188      else if (rcc == CMD_BREAK_RC)  break;
     189    }
    190190  }
    191191}
  • trunk/SophyaLib/SysTools/cxxcmplnk.cc

    r2727 r2796  
    1313  The present version has been adapted for different compilers and
    1414  systems:
    15   - Linux-g++
    16   - Linux-KCC
    17   - MacOS X/Darwin (Apple OS X 10.2 and 10.3)
    18   - OSF-cxx : (HP/Compaq/Digital OSF-Tru64 and cxx c++ compiler)
    19   - SGI-CC : Silicon Graphics system and C++ compiler
     15  - Linux + GNU compiler (g++)
     16  - Linux + Intel compiler (icc)
     17  - Darwin + GNU compiler (MaxOS X 10.3 and 10.4)
     18  - OSF1 + cxx (HP/Compaq/Digital OSF-Tru64 and cxx c++ compiler)
     19  - IRIX64 + CC : Silicon Graphics system and C++ compiler
    2020
    2121  \sa SOPHYA::PDynLinkMgr
     
    3939static char * KCC_opt =
    4040"-O --exceptions --rtti  --auto_instantiation --one_instantiation_per_object -D__KCC__";
     41static char * icc_opt =
     42"-O -fpic -frtti";
    4143static char * cxx_opt =
    42 "-O -no_implicit_include ";
     44"-O -no_implicit_include -pthread";
    4345static char * SGICC_opt =  "-O -prelink -D__SGICC__ -LANG:std";
    4446
     
    8587  linkOptions = "-O -shared";
    8688  syscomp += "g++/";
    87 #elif defined( __DECCXX )
     89#endif
     90#if defined( __DECCXX )
    8891  compCmd = "cxx ";
    8992  compOptions = cxx_opt;
    90   linkOptions = compOptions + "-shared";
     93  linkOptions = compOptions + " -shared";
    9194  syscomp += "cxx/";
    92 #elif defined( __KCC__ )
     95#endif
     96#if defined( __KCC__ )
    9397  compCmd = "KCC ";
    9498  compOptions = KCC_opt;
    9599  linkOptions = KCC_opt;
    96100  syscomp += "KCC/"; 
    97 #elif defined( __SGICC__ )
     101#endif
     102#if defined( __SGICC__ )
    98103  compCmd = "CC ";
    99104  compOptions = SGICC_opt;
     
    104109  linkOptions += " -64 ";
    105110#endif
     111#endif
     112#if defined( __INTEL_COMPILER )
     113  compCmd = "icpc ";
     114  compOptions = icc_opt;
     115  linkOptions = icc_opt + " -shared";
     116  syscomp += "icc/"; 
    106117#endif
    107118
  • trunk/SophyaLib/SysTools/resusage.cc

    r2615 r2796  
    204204  ifstream fich(flnm) ;
    205205
    206   fich.getline(buff,200); // on saute une ligne
     206  fich.getline(buff,500); // on saute une ligne
    207207
    208208  string tst;
Note: See TracChangeset for help on using the changeset viewer.