Last change
on this file since 1929 was 1900, checked in by ansari, 24 years ago |
Portage sous Mac OS X - Reza 15/02/2002
|
File size:
1.5 KB
|
Rev | Line | |
---|
[1275] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
| 2 | // Gestionnaire de compilation-linker C++ - R. Ansari 10/2000
|
---|
| 3 | // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA
|
---|
| 4 |
|
---|
| 5 | #ifndef CXXCOMPILERLINKER_SEEN
|
---|
| 6 | #define CXXCOMPILERLINKER_SEEN
|
---|
| 7 |
|
---|
| 8 | #include "machdefs.h"
|
---|
| 9 | #include <string>
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 | namespace SOPHYA {
|
---|
| 13 |
|
---|
| 14 | //! C++ compiler - linker
|
---|
| 15 |
|
---|
| 16 | class CxxCompilerLinker {
|
---|
| 17 | public:
|
---|
[1900] | 18 | CxxCompilerLinker(bool fglibsophya=true, bool fglibextsophya=true,
|
---|
| 19 | bool fglibpi=false);
|
---|
[1275] | 20 | virtual ~CxxCompilerLinker();
|
---|
| 21 |
|
---|
[1277] | 22 | virtual int Compile(string const & name, string & oname);
|
---|
| 23 | virtual int BuildSO(string const & oname, string & soname);
|
---|
[1275] | 24 |
|
---|
| 25 | inline void AddCompileOptions(string const & opt)
|
---|
[1288] | 26 | { compOptions += " " + opt; }
|
---|
[1275] | 27 | inline void SetCompileOptions(string const & opt = "")
|
---|
| 28 | { compOptions = opt; }
|
---|
| 29 | inline string GetCompileOptions()
|
---|
| 30 | { return compOptions; }
|
---|
| 31 |
|
---|
| 32 | inline void AddLinkOptions(string const & opt)
|
---|
[1288] | 33 | { linkOptions += " " + opt; }
|
---|
[1275] | 34 | inline void SetLinkOptions(string const & opt = "")
|
---|
| 35 | { linkOptions = opt; }
|
---|
| 36 | inline string GetLinkOptions()
|
---|
| 37 | { return linkOptions; }
|
---|
| 38 |
|
---|
| 39 | inline void SetTmpDir(string const & tmpdir)
|
---|
| 40 | { tmpDir = tmpdir; }
|
---|
| 41 | inline string GetTmpDir()
|
---|
| 42 | { return tmpDir; }
|
---|
| 43 |
|
---|
| 44 | inline void SetVerbose(bool fg=false)
|
---|
| 45 | { verbose = fg; }
|
---|
| 46 |
|
---|
| 47 | protected :
|
---|
| 48 | string tmpDir;
|
---|
| 49 | string compCmd;
|
---|
[1900] | 50 | string linkCmd;
|
---|
[1275] | 51 | string compOptions;
|
---|
| 52 | string linkOptions;
|
---|
| 53 | string cppFlags;
|
---|
| 54 | bool verbose;
|
---|
| 55 | };
|
---|
| 56 |
|
---|
| 57 | } // namespace SOPHYA
|
---|
| 58 |
|
---|
| 59 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.