source: Sophya/trunk/SophyaLib/SysTools/cxxcmplnk.h@ 1288

Last change on this file since 1288 was 1288, checked in by ansari, 25 years ago

options += _blanc_ + options, cmv 2/11/00

File size: 1.4 KB
Line 
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
12namespace SOPHYA {
13
14//! C++ compiler - linker
15
16class CxxCompilerLinker {
17public:
18 CxxCompilerLinker();
19 virtual ~CxxCompilerLinker();
20
21 virtual int Compile(string const & name, string & oname);
22 virtual int BuildSO(string const & oname, string & soname);
23
24 inline void AddCompileOptions(string const & opt)
25 { compOptions += " " + opt; }
26 inline void SetCompileOptions(string const & opt = "")
27 { compOptions = opt; }
28 inline string GetCompileOptions()
29 { return compOptions; }
30
31 inline void AddLinkOptions(string const & opt)
32 { linkOptions += " " + opt; }
33 inline void SetLinkOptions(string const & opt = "")
34 { linkOptions = opt; }
35 inline string GetLinkOptions()
36 { return linkOptions; }
37
38 inline void SetTmpDir(string const & tmpdir)
39 { tmpDir = tmpdir; }
40 inline string GetTmpDir()
41 { return tmpDir; }
42
43 inline void SetVerbose(bool fg=false)
44 { verbose = fg; }
45
46protected :
47 string tmpDir;
48 string compCmd;
49 string compOptions;
50 string linkOptions;
51 string cppFlags;
52 bool verbose;
53};
54
55} // namespace SOPHYA
56
57#endif
Note: See TracBrowser for help on using the repository browser.