[Compbench-devel] CompBenchmarks++/Compiler/Compiler-TCC Compiler-TCC.cpp, NONE, 1.1 Compiler-TCC.h
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2006-11-01 11:19:33
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3885 Added Files: Compiler-TCC.cpp Compiler-TCC.h Makefile.am Log Message: Moved from Benchmark/Compiler. Refactorying. --- NEW FILE: Compiler-TCC.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-TCC.h,v 1.1 2006/11/01 11:19:30 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMCOMPILER_TCC #define H_CBMCOMPILER_TCC #include <Compiler/Compiler.h> /** \brief Defines the tcc compiler */ class CBMBenchmarkContextCompilerTCC : public CBMBenchmarkContextCompiler { private: protected: virtual std::string getCompilerName(void); virtual std::string getCompilerVersion(void); virtual char *language(void); public: CBMBenchmarkContextCompilerTCC (class CBMSystem *_system, char *_compilerBinary); virtual std::string compiler(void); virtual ~CBMBenchmarkContextCompilerTCC(); }; #endif --- NEW FILE: Makefile.am --- noinst_LTLIBRARIES = libCompilerTCC.la sources = Compiler-TCC.cpp libCompilerTCC_la_SOURCES = $(sources) libCompilerinclude_HEADERS = $(sources:.cpp=.h) libCompilerincludedir = $(includedir)/Compiler/Compiler-TCC INCLUDES = -I $(top_srcdir) --- NEW FILE: Compiler-TCC.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-TCC.cpp,v 1.1 2006/11/01 11:19:30 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Compiler/Compiler-TCC/Compiler-TCC.h> #include <System/System.h> CBMBenchmarkContextCompilerTCC::CBMBenchmarkContextCompilerTCC(CBMSystem *_system, char *_compilerBinary) : CBMBenchmarkContextCompiler(_system, _compilerBinary) { } std::string CBMBenchmarkContextCompilerTCC::compiler(void) { std::string str = "tcc"; return(str); } std::string CBMBenchmarkContextCompilerTCC::getCompilerName(void) { std::string result = "Tiny C Compiler "; result+=getCompilerVersion(); return(result); } std::string CBMBenchmarkContextCompilerTCC::getCompilerVersion(void) { std::string cmd; std::string result; cmd+=compilerBinary; cmd+=" -v"; system->exec(cmd, result); /* !!! */ return(result); } char *CBMBenchmarkContextCompilerTCC::language(void) { return("C"); } CBMBenchmarkContextCompilerTCC::~CBMBenchmarkContextCompilerTCC() { } |