source: Sophya/trunk/SophyaPI/PIext/cxxexecutor.cc@ 1269

Last change on this file since 1269 was 1269, checked in by ercodmgr, 25 years ago

Retour de ExecuteCXX pour CxxExecWind
Finalisation de CxxExecWind cmv 1/11/00

  • Property svn:executable set to *
File size: 17.5 KB
Line 
1#include "cxxexecutor.h"
2
3#include <typeinfo>
4
5#include "strutilxx.h"
6#include "dvlist.h"
7
8#include "nomgadapter.h"
9#include "pistdimgapp.h"
10
11
12/* --Methode-- */
13CxxExecutor::CxxExecutor(PIACmd *mpiac, PIStdImgApp* /* app */)
14 : mUserCodeFn(""), mUserFctFn(""), mCompOpt(""), mLinkOpt(""), mMyLibs("")
15 , mDefTmp(""), mDefRoot("cxx_spiapp"), mDefFunc("usercxx"), mPrtLevel(1)
16{
17mIncList.resize(0);
18mCallArgs.resize(0);
19
20// Gestion des fichiers par default dans TmpDir
21//.... CMV a gerer mais pas forcement OK ... voir avec Rz
22//NamedObjMgr omg;
23//string tmpdir = omg.GetTmpDir();
24//if(tmpdir.size()>1) mDefTmp = tmpdir;
25
26// On enregistre les nouvelles commandes
27string hgrp = "CxxExecutorCmd";
28string usage,kw;
29
30kw = "c++exec";
31usage = "c++exec: Execute the following c++ user code\n";
32usage+= "Usage: c++exec c++ user code\n";
33usage+= "Warning: c++ user code can be found in \"TmpDir/"+mDefRoot+".h\"\n";
34usage+= " total generated code can be found in \"TmpDir/"+mDefRoot+".cc\"";
35mpiac->RegisterCommand(kw, usage, this, hgrp);
36
37kw = "c++execfrf";
38usage = "c++execfrf: Execute c++ user_code [user_function_code]\n";
39usage+= "Usage: c++execfrf fileuser.cc [fileuserfct.cc]\n";
40usage+= "Warning: total generated code can be found in \"TmpDir/"+mDefRoot+".cc\"";
41mpiac->RegisterCommand(kw, usage, this, hgrp);
42
43kw = "c++args";
44usage = "c++args: Define user function arguments for c++exec and c++execfrf\n";
45usage+= "Usage: c++args arg1 arg2 arg3 ...\n";
46usage+= " c++args -? : give current arguments\n";
47usage+= " c++args : reset current arguments";
48mpiac->RegisterCommand(kw, usage, this, hgrp);
49
50kw = "c++create";
51usage = "c++create: create a file to be used by spiapp\n";
52usage+= "Usage: c++create file.cc func c++ user code...\n";
53mpiac->RegisterCommand(kw, usage, this, hgrp);
54
55kw = "c++createfrf";
56usage = "c++createfrf: create a file \"file.cc\"to be used by spiapp\n";
57usage+= " with a user file code \"fileuser.cc\"\n";
58usage+= " and an optional user function code \"fileuserfct.cc\"\n";
59usage+= "Usage: c++createfrf file.cc func fileuser.cc [fileuserfct.cc]\n";
60mpiac->RegisterCommand(kw, usage, this, hgrp);
61
62kw = "c++compile";
63usage = "c++compile: compile a file (file.cc -> file.so)\n";
64usage+= "Usage: c++compile file\n";
65usage+= "Warning: give \"file\" or \"file.so\" to create \"file.so\" from \"file.cc\"\n";
66usage+= " : to be used before c++link";
67mpiac->RegisterCommand(kw, usage, this, hgrp);
68
69kw = "c++link";
70usage = "c++link: link function \"func\" in file.so to spiapp\n";
71usage+= "Usage: c++link file.so func";
72mpiac->RegisterCommand(kw, usage, this, hgrp);
73
74kw = "c++include";
75usage = "c++include: give personnal includes to be used\n";
76usage+= "Usage: c++include myinc1.h myinc2.h ...\n";
77usage+= " c++include -? : give current include files\n";
78usage+= " c++include : reset current include files\n";
79usage+= "Warning: to be used before c++create... c++exec...";
80mpiac->RegisterCommand(kw, usage, this, hgrp);
81
82kw = "c++compileopt";
83usage = "c++compileopt: give additionnal compile options\n";
84usage+= "Usage: c++compileopt -g -O5 -IMy_Inc_Dir ...\n";
85usage+= " c++compileopt -? : give current compile options\n";
86usage+= " c++compileopt : reset current compile options\n";
87usage+= "Warning: to be used before c++compile";
88mpiac->RegisterCommand(kw, usage, this, hgrp);
89
90kw = "c++linkopt";
91usage = "c++linkopt: give additionnal link options\n";
92usage+= "Usage: c++linkopt -g -O5 ...\n";
93usage+= " c++linkopt -? : give current link options\n";
94usage+= " c++linkopt : reset current link options\n";
95usage+= "Warning: to be used before c++compile";
96mpiac->RegisterCommand(kw, usage, this, hgrp);
97
98kw = "c++mylibs";
99usage = "c++mylibs: give additionnal libraries\n";
100usage+= "Usage: c++mylibs -LMy_Lib_Dir -lmylib1 -lmylib2 ...\n";
101usage+= " c++mylibs -? : give current additionnal libraries\n";
102usage+= " c++mylibs : reset current additionnal libraries\n";
103usage+= "Warning: to be used before c++compile";
104mpiac->RegisterCommand(kw, usage, this, hgrp);
105
106
107}
108
109/* --Methode-- */
110CxxExecutor::~CxxExecutor()
111{
112}
113
114/* --Methode-- */
115int CxxExecutor::Execute(string& kw, vector<string>& tokens, string& toks)
116{
117int rc=0;
118if(kw == "c++exec") {
119 if(tokens.size()<1) {
120 cout<<"Usage: c++exec c++ user code"<<endl;
121 return(1);
122 }
123 rc = ExecuteCXX(toks); if(rc) return(1);
124
125} else if(kw == "c++execfrf") {
126 if(tokens.size()<1) {
127 cout<<"Usage: c++execfrf fileuser.cc [fileuserfct.cc]"<<endl;
128 return(1);
129 }
130 rc = FillUserCode(tokens[0]); if(rc) return(1);
131 if(tokens.size()>1) rc = FillUserFctFrF(tokens[1]);
132 rc = CrFile(); if(rc) return(1);
133 rc = Compile(); if(rc) return(1);
134 rc = Link(); if(rc) return(1);
135 rc = Call(); if(rc) return(1);
136
137} else if(kw == "c++args") {
138 if(tokens.size()==1) if(tokens[0]=="-?")
139 {cout<<"c++args "<<GetArgs()<<endl; return(0);}
140 FillArgs(tokens);
141
142} else if(kw == "c++create") {
143 if(tokens.size()<3) {
144 cout<<"Usage: c++create file.cc func c++ user code ..."<<endl;
145 return(1);
146 }
147 rc = FillUserCode(toks,2); if(rc) return(1);
148 rc = CrFile(tokens[0],tokens[1]); if(rc) return(1);
149
150} else if(kw == "c++createfrf") {
151 if(tokens.size()<3) {
152 cout<<"Usage: c++createfrf file.cc func fileuser.cc [fileuserfct.cc]"<<endl;
153 return(1);
154 }
155 rc = FillUserCode(tokens[2]); if(rc) return(1);
156 if(tokens.size()>3) FillUserFctFrF(tokens[3]);
157 rc = CrFile(tokens[0],tokens[1]); if(rc) return(1);
158
159} else if(kw == "c++compile") {
160 if(tokens.size()>=1) rc = Compile(tokens[0]);
161 else rc = Compile();
162 if(rc) return(1);
163
164} else if(kw == "c++link") {
165 if(tokens.size()>=2) rc = Link(tokens[0],tokens[1]);
166 else if(tokens.size()>=1) rc = Link(tokens[0]);
167 else rc = Link();
168 if(rc) return(1);
169
170} else if(kw == "c++include") {
171 if(tokens.size()==1) if(tokens[0]=="-?")
172 {cout<<"c++include "<<GetInclude()<<endl; return(0);}
173 FillInclude(tokens);
174
175} else if(kw == "c++compileopt") {
176 if(tokens.size()==1) if(tokens[0]=="-?")
177 {cout<<"c++compileopt "<<GetCompileOpt()<<endl; return(0);}
178 FillCompileOpt(tokens);
179
180} else if(kw == "c++linkopt") {
181 if(tokens.size()==1) if(tokens[0]=="-?")
182 {cout<<"c++linkopt "<<GetLinkOpt()<<endl; return(0);}
183 FillLinkOpt(tokens);
184
185} else if(kw == "c++mylibs") {
186 if(tokens.size()==1) if(tokens[0]=="-?")
187 {cout<<"c++mylibs "<<GetLinkLibs()<<endl; return(0);}
188 FillLinkLibs(tokens);
189}
190
191return(0);
192}
193
194/* --Methode-- */
195int CxxExecutor::ExecuteCXX(string usercode,string userfct)
196{
197int rc=0;
198rc = FillUserCode(usercode,0); if(rc) return(1);
199rc = FillUserFctFrS(userfct);
200rc = CrFile(); if(rc) return(1);
201rc = Compile(); if(rc) return(1);
202rc = Link(); if(rc) return(1);
203rc = Call(); if(rc) return(1);
204return 0;
205}
206
207/* --Methode-- */
208int CxxExecutor::CrFile(string cfilename,string func)
209{
210if(cfilename.size()<1) cfilename = mDefTmp + mDefRoot + ".cc";
211if(func.size()<1) func = mDefFunc;
212
213ofstream os(cfilename.c_str(),ios::out);
214if(!os)
215 {cout<<"CxxExecutor::CrFile: unable to open "<<cfilename<<endl;
216 return 1;}
217
218PutInclude(os);
219os<<endl;
220
221PutIncludeUser(os);
222os<<endl;
223
224os<<"//-------------------------------------------------//"<<endl;
225os<<"//----------------- User Functions ----------------//"<<endl;
226os<<"//-------------------------------------------------//"<<endl;
227if(mUserFctFn.size()>0) os<<"#include \""<<mUserFctFn<<"\""<<endl;
228os<<endl;
229
230
231os<<"extern \"C\" {"<<endl;
232os<<" int "<<func<<"( vector<string>& args );"<<endl;
233os<<"}"<<endl<<endl;
234os<<"int "<<func<<"( vector<string>& args )"<<endl;
235os<<"{"<<endl;
236os<<"// Some definitions to help using spiapp;"<<endl;
237os<<"NamedObjMgr omg;"<<endl;
238os<<"Services2NObjMgr& srvo = *omg.GetServiceObj();"<<endl;
239os<<endl;
240
241PutObject(os);
242os<<endl;
243
244PutVar(os);
245os<<endl;
246
247os<<"//--------------------------------------------//"<<endl;
248os<<"//----------------- User Code ----------------//"<<endl;
249os<<"//--------------------------------------------//"<<endl;
250if(mUserCodeFn.size()>0) os<<"#include \""<<mUserCodeFn<<"\""<<endl;
251os<<endl;
252
253os<<"return 0;"<<endl;
254os<<"}"<<endl;
255
256if(mPrtLevel)
257 cout<<"File "<<cfilename<<" for function "<<func<<" created :"<<endl;
258if(mPrtLevel && mUserCodeFn.size()>0)
259 cout<<" User code was in file "<<mUserCodeFn<<endl;
260if(mPrtLevel && mUserFctFn.size()>0)
261 cout<<" User function code was in file "<<mUserFctFn<<endl;
262return 0;
263}
264
265/* --Methode-- */
266void CxxExecutor::PutInclude(ofstream& os)
267{
268os<<"#include \"machdefs.h\""<<endl
269 <<endl
270
271 <<"//---- System et stdc++ include files"<<endl
272 <<"#include <stdio.h>"<<endl
273 <<"#include <stdlib.h>"<<endl
274 <<"#include <math.h>"<<endl
275 <<"#include <ctype.h>"<<endl
276 <<"#include <string.h>"<<endl
277 <<"#include <iostream.h>"<<endl
278 <<"#include <fstream.h>"<<endl
279 <<"#include <complex>"<<endl
280 <<endl
281
282 <<"#include <typeinfo>"<<endl
283 <<"#include <string>"<<endl
284 <<"#include <vector>"<<endl
285 <<"#include <map>"<<endl
286 <<"#include <functional>"<<endl
287 <<"#include <list>"<<endl
288 <<endl
289
290 <<"//---- Sophya include files"<<endl
291 <<"#include \"systools.h\""<<endl
292 <<"#include \"ntools.h\""<<endl
293 <<"#include \"array.h\""<<endl
294 <<"#include \"histats.h\""<<endl
295 <<endl
296
297 <<"//---- Spiapp include files"<<endl
298 <<"#include \"nobjmgr.h\""<<endl
299 <<"#include \"servnobjm.h\""<<endl
300 <<endl
301
302 <<"#define KeepObj(obj) ___nomobj = #obj; omg.AddObj(obj,___nomobj);"<<endl
303 <<"#define KeepVar(var) ___nomobj = #var; omg.GetVarList().Get(___nomobj) = var ;"<<endl
304 <<endl;
305
306return;
307}
308
309/* --Methode-- */
310void CxxExecutor::PutIncludeUser(ofstream& os)
311{
312if(mIncList.size()<1) return;
313for(uint_4 i=0;i<mIncList.size();i++)
314 os<<"#include \""<<mIncList[i]<<"\""<<endl;
315}
316
317/* --Methode-- */
318void CxxExecutor::PutObject(ofstream& os)
319{
320NamedObjMgr omg;
321NObjMgrAdapter* objmgrad;
322vector<string> objlist;
323string patt = "*";
324omg.GetObjList(patt,objlist);
325int nobjs = objlist.size();
326
327os<<"//-------------- Object List --------------"<<endl;
328os<<"//Number of objects = "<<nobjs<<endl;
329os<<"string ___nomobj;"<<endl<<endl;
330if(nobjs<=0) return;
331
332string dir,nobj,stmp,obtype;
333for(int i=0;i<nobjs;i++) {
334 objmgrad = omg.GetObjAdapter(objlist[i]);
335 omg.ParseObjectName(objlist[i],dir,nobj);
336 obtype = objmgrad->GetDataObjType();
337 stmp = "___" + nobj;
338
339 os<<"___nomobj = \""<<nobj<<"\";"<<endl;
340 os<<obtype<<"* "<<stmp
341 <<" = dynamic_cast< "<<obtype<<" * >(omg.GetObj(___nomobj));"<<endl;
342 os<<"if("<<stmp<<"==NULL) throw NullPtrError"
343 <<"(\"CxxExecutor::PutObject: Non existing object "<<nobj
344 <<"... please update file\");"<<endl;
345 os<<obtype<<"& "<<nobj<<" = (*"<<stmp<<");"<<endl<<endl;
346}
347
348return;
349}
350
351/* --Methode-- */
352void CxxExecutor::PutVar(ofstream& os)
353{
354os<<"//-------------- Variable List --------------"<<endl;
355NamedObjMgr omg;
356DVList& varlist = omg.GetVarList();
357// varlist.Show(); varlist.Print();
358DVList::ValList::const_iterator it;
359for(it=varlist.Begin(); it!=varlist.End(); it++) {
360 string key = (*it).first;
361 if (isalpha(key[0]) ) {
362 os<<"___nomobj = \""<<key<<"\";"<<endl;
363 os<<"MuTyV & $"<<key<<" = omg.GetVarList().Get(___nomobj);"<<endl;
364 }
365}
366
367return;
368}
369
370/* --Methode-- */
371int CxxExecutor::FillUserCode(string& usercode,uint_4 first)
372// - first is the first position in the "string" where the code starts
373// User code is read from input. It is put into file "TmpDir/cxx_spiapp.h".
374{
375mUserCodeFn = "";
376
377// get the string part which is after word "first"
378string code = usercode;
379if(code.size()<=0) {cout<<"CxxExecutor::FillUserCode: no user code"<<endl;
380 return 1;}
381size_t q;
382for(uint_4 i=0;i<=first;i++) {
383 q = code.find_first_not_of(" \t");
384 if(q>=code.size()) {code=""; break;}
385 code = code.substr(q);
386 if(i==first) break;
387 q = code.find_first_of(" \t");
388 if(q>=code.size()) {code=""; break;}
389 code = code.substr(q);
390}
391if(code.size()<=0)
392 {cout<<"CxxExecutor::FillUserCode: no user code after "<<first<<endl;
393 return 1;}
394
395// Fill the file with user code
396mUserCodeFn = mDefTmp + mDefRoot + ".h";
397ofstream os(mUserCodeFn.c_str(),ios::out);
398if(!os) {cout<<"CxxExecutor::FillUserCode: unable to open "
399 <<mUserCodeFn<<endl; mUserCodeFn = ""; return 1;}
400os<<code<<endl;
401if(mPrtLevel)
402 cout<<"User code filled from standard input into "<<mUserCodeFn<<endl;
403return 0;
404}
405
406/* --Methode-- */
407int CxxExecutor::FillUserFctFrS(string userfct)
408// - Fill user Fonction code from string "userfct"
409// It is put into file "TmpDir/cxx_spiapp_fct.h".
410{
411mUserFctFn = "";
412if(userfct.size()<1) return 0;
413mUserFctFn = mDefTmp + mDefRoot + "_fct.h";
414ofstream os(mUserFctFn.c_str(),ios::out);
415if(!os) {cout<<"CxxExecutor::FillUserFctFrS: unable to open "
416 <<mUserFctFn<<endl; mUserFctFn = ""; return 1;}
417os<<userfct<<endl;
418if(mPrtLevel)
419 cout<<"User Function code filled from standard input into "<<mUserFctFn<<endl;
420return 0;
421}
422
423/* --Methode-- */
424int CxxExecutor::FillUserCode(string filename)
425// User code is read from "filename".
426{
427mUserCodeFn = filename;
428if(mPrtLevel && mUserCodeFn.size()>0)
429 cout<<"User code filled from file "<<mUserCodeFn<<endl;
430return 0;
431}
432
433/* --Methode-- */
434int CxxExecutor::FillUserFctFrF(string filefctname="")
435{
436mUserFctFn = filefctname;
437if(mPrtLevel && mUserFctFn.size()>0)
438 cout<<"User Function code filled from file "<<mUserFctFn<<endl;
439return 0;
440}
441
442/* --Methode-- */
443int CxxExecutor::Compile(string rootfilename)
444{
445if(rootfilename.size()<1) rootfilename = mDefRoot;
446if(mPrtLevel) cout<<"Compile: "<<rootfilename<<endl;
447int rc = 0;
448rc = CrMakefile();
449if(rc) return(1);
450string make = "";
451make += "make -f " + mDefRoot + "_Makefile";
452make += " CXXFLAGS=\"" + mCompOpt + "\"";
453make += " LDFLAGS=\"" + mLinkOpt + "\"";
454make += " MYLIBS=\"" + mMyLibs + "\"";
455make += " " + rootfilename;
456rc = system(make.c_str());
457if(rc)
458 {cout<<"CxxExecutor::Compile : \n"<<make<<" Failed"<<endl;
459 return 1000+rc;}
460return 0;
461}
462
463/* --Methode-- */
464int CxxExecutor::CrMakefile(void)
465{
466string makename = mDefTmp + mDefRoot + "_Makefile";
467ofstream os(makename.c_str(),ios::out);
468if(!os)
469 {cout<<"CxxExecutor::CrMakefile: unable to open file for Makefile"<<endl;
470 return 1;}
471//---------------------------------------------------------------------
472os<<"MODULEDECCXXFLAGS := -msg_quiet"<<endl;
473os<<"include $(DPCBASEREP)/Include/MakefileUser.h"<<endl;
474os<<"MYLIBS ="<<endl;
475os<<"LIBS = -L$(SLB) -lPI -lextsophya -lsophya -lm"<<endl;
476os<<"ifeq ($(MACHEROS),OSF1)"<<endl;
477os<<"LIBS := $(LIBS) -lfor"<<endl;
478os<<"endif"<<endl;
479os<<"ifeq ($(MACHEROS),Linux)"<<endl;
480os<<"LIBS := $(LIBS) -ldl -lf2c"<<endl;
481os<<"endif"<<endl;
482os<<"%.so:%.o"<<endl;
483os<<"%:%.cc"<<endl;
484os<<"%:%.o"<<endl;
485os<<"%.o:%.cc"<<endl;
486os<<"%.o:%.c"<<endl;
487os<<"%:%.c"<<endl;
488os<<endl;
489os<<".PRECIOUS: %.so"<<endl;
490os<<endl;
491os<<"%:%.so"<<endl;
492os<<"\t"<<"echo $@ \" made (.so) \""<<endl;
493os<<"%.so:%.o"<<endl;
494os<<"\t"<<"$(LINK.cc) -shared -o $@ $< $(LIBS) $(MYLIBS)"<<endl;
495os<<"%.o:%.cc"<<endl;
496os<<"\t"<<"$(COMPILE.cc) -o $@ $<"<<endl;
497os<<"%.o:%.c"<<endl;
498os<<"\t"<<"$(COMPILE.c) -c $(CFLAGS) $(USERFLAGS) -o $@ $<"<<endl;
499//---------------------------------------------------------------------
500return 0;
501}
502
503/* --Methode-- */
504int CxxExecutor::Link(string libname,string func)
505{
506if(libname.size()<1) libname = mDefTmp + mDefRoot + ".so";
507if(func.size()<1) func = mDefFunc;
508
509NamedObjMgr omg;
510PIACmd* mpiac = omg.GetImgApp()->CmdInterpreter();
511string key("link");
512vector<string> arg; arg.push_back(libname); arg.push_back(func);
513string toks = libname + " " + func;
514int rc = mpiac->ExecuteCommand(key,arg,toks);
515if(mPrtLevel) cout<<"Link from "<<libname<<" for function "<<func
516 <<" (rc="<<rc<<")"<<endl;
517return 0;
518}
519
520/* --Methode-- */
521int CxxExecutor::Call(string func)
522{
523if(func.size()<1) func = mDefFunc;
524
525NamedObjMgr omg;
526PIACmd* mpiac = omg.GetImgApp()->CmdInterpreter();
527string key("call");
528vector<string> arg; arg.push_back(func);
529string toks = func;
530if(mCallArgs.size()>0)
531 for(uint_4 i=0;i<mCallArgs.size();i++) arg.push_back(mCallArgs[i]);
532mpiac->ExecuteCommand(key,arg,toks);
533return 0;
534}
535
536/* --Methode-- */
537void CxxExecutor::FillArgs(vector<string>& args)
538{
539mCallArgs.resize(0);
540if(args.size()<1) return;
541for(uint_4 i=0;i<args.size();i++) mCallArgs.push_back(args[i]);
542}
543
544void CxxExecutor::FillArgs(string& args)
545{
546mCallArgs.resize(0);
547FillVStringFrString(args,mCallArgs,' ');
548}
549
550string CxxExecutor::GetArgs(void)
551{
552string dum = "";
553if(mCallArgs.size()<1) return dum;
554for(uint_4 i=0;i<mCallArgs.size();i++) dum += mCallArgs[i] + " ";
555return dum;
556}
557
558/* --Methode-- */
559void CxxExecutor::FillInclude(vector<string>& inc)
560{
561mIncList.resize(0);
562if(inc.size()<1) return;
563for(uint_4 i=0;i<inc.size();i++) mIncList.push_back(inc[i]);
564}
565
566void CxxExecutor::FillInclude(string& inc)
567{
568mIncList.resize(0);
569FillVStringFrString(inc,mIncList,' ');
570}
571
572string CxxExecutor::GetInclude(void)
573{
574string dum = "";
575if(mIncList.size()<1) return dum;
576for(uint_4 i=0;i<mIncList.size();i++) dum += mIncList[i] + " ";
577return dum;
578}
579
580/* --Methode-- */
581void CxxExecutor::FillCompileOpt(vector<string>& copt)
582{
583mCompOpt = "";
584if(copt.size()<1) return;
585for(uint_4 i=0;i<copt.size();i++) mCompOpt += copt[i] + " ";
586}
587
588void CxxExecutor::FillCompileOpt(string& copt)
589{
590mCompOpt = copt;
591}
592
593string CxxExecutor::GetCompileOpt(void)
594{
595return mCompOpt;
596}
597
598/* --Methode-- */
599void CxxExecutor::FillLinkOpt(vector<string>& lopt)
600{
601mLinkOpt = "";
602if(lopt.size()<1) return;
603for(uint_4 i=0;i<lopt.size();i++) mLinkOpt += lopt[i] + " ";
604}
605
606void CxxExecutor::FillLinkOpt(string& lopt)
607{
608mLinkOpt = lopt;
609}
610
611string CxxExecutor::GetLinkOpt(void)
612{
613return mLinkOpt;
614}
615
616/* --Methode-- */
617void CxxExecutor::FillLinkLibs(vector<string>& llibs)
618{
619mMyLibs = "";
620if(llibs.size()<1) return;
621for(uint_4 i=0;i<llibs.size();i++) mMyLibs += llibs[i] + " ";
622}
623
624void CxxExecutor::FillLinkLibs(string& llibs)
625{
626mMyLibs = llibs;
627}
628
629string CxxExecutor::GetLinkLibs(void)
630{
631return mMyLibs;
632}
Note: See TracBrowser for help on using the repository browser.