Changeset 2727 in Sophya for trunk/SophyaLib/SysTools


Ignore:
Timestamp:
May 18, 2005, 12:26:49 PM (20 years ago)
Author:
ansari
Message:

prise en compte de la nouvelle variable d'env. SOPHYABASE ds CxxCompilerLinker - Reza 18/05/2005

File:
1 edited

Legend:

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

    r2615 r2727  
    3636
    3737static char * gcxx_opt =
    38 "-O -Wall -Wpointer-arith -Wmissing-prototypes -Wsynth -fdollars-in-identifiers";
     38"-O -fdollars-in-identifiers";
    3939static char * KCC_opt =
    4040"-O --exceptions --rtti  --auto_instantiation --one_instantiation_per_object -D__KCC__";
     
    116116  compOptions += " -c ";
    117117
    118   string dpcbase;
     118  bool fgenv1 = false;
     119  bool fgenv2 = false;
    119120  char* varenv=NULL;
     121  varenv=getenv("SOPHYABASE");
     122  if (varenv) {
     123    fgenv1 = true;
     124    string sbaserep = varenv;
     125    if (sbaserep[sbaserep.length()-1] != '/')  sbaserep += '/';
     126    cppFlags += ( " -I" + sbaserep + "include/ ");
     127    linkOptions += " -L" + sbaserep + "slb/";
     128  }
    120129  varenv=getenv("SOPHYABASEREP");
    121130  if (varenv) {
    122     dpcbase = varenv;
     131    fgenv2 = true;
     132    string dpcbase = varenv;
    123133    if (dpcbase[dpcbase.length()-1] != '/')  dpcbase += '/';
    124134    cppFlags += ( " -I" + dpcbase + "Include/ ");
    125135    linkOptions += " -L" + dpcbase + syscomp + "ShLibs/";
    126     if (fglibsophya) linkOptions += " -lsophya ";
    127     if (fglibextsophya) linkOptions += " -lextsophya ";
    128     if (fglibpi) linkOptions += " -lPI ";
    129   }
    130   linkOptions += " -lm ";
    131 
    132   string extlib;
    133   varenv=getenv("EXTLIBDIR");
    134   if (varenv) {
    135     extlib = varenv;
     136    char * varenvextl=getenv("EXTLIBDIR");
     137    if (varenvextl) {
     138    string extlib = varenvextl;
    136139    if (extlib[extlib.length()-1] != '/')  extlib += '/';
    137140    cppFlags += ( " -I" + extlib +"Include/ ");
    138   }
     141    }
     142  }
     143  if (!fgenv1 && !fgenv2)
     144    cout << " CxxCompilerLinker()/Warning : SOPHYABASE not defined" << endl;
     145  if (fgenv1 && fgenv2)
     146    cout << " CxxCompilerLinker()/Warning : both SOPHYABASE and SOPHYABASEREP defined" << endl;
     147
     148  if (fglibsophya) linkOptions += " -lsophya ";
     149  if (fglibextsophya) linkOptions += " -lextsophya ";
     150  if (fglibpi) linkOptions += " -lPI ";
     151  linkOptions += " -lm ";
     152
    139153
    140154  if ( (varenv=getenv("TMPDIR")) != NULL )  {
Note: See TracChangeset for help on using the changeset viewer.