[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-TCC Compiler-TCC.cpp, NONE,
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-22 18:24:25
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-TCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20703/Compiler-TCC Added Files: Compiler-TCC.cpp Compiler-TCC.h Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: Compiler-TCC.h --- /* ---------------------------------------------------------------------------- $Id: Compiler-TCC.h,v 1.1 2007/01/22 18:24:21 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> namespace CBM { /** \brief Defines the tcc compiler */ class CompilerTCC : public Compiler { private: protected: virtual std::string getCompilerName(void); virtual std::string getCompilerVersion(void); virtual char *language(void); public: CompilerTCC (class System *_system, char *_compilerBinary); virtual std::string compiler(void); virtual ~CompilerTCC(); }; } #endif --- NEW FILE: Makefile.am --- # ----------------------------------------------------------------------------- # $Id: Makefile.am,v 1.1 2007/01/22 18:24:21 xfred Exp $ # $Source: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-TCC/Makefile.am,v $ # # This is free software. # For details, see the GNU Public License in the COPYING file, or # Look http://www.fsf.org # ----------------------------------------------------------------------------- noinst_LTLIBRARIES = libCompilerTCC.la sources = Compiler-TCC.cpp libCompilerTCC_la_SOURCES = $(sources) libCompilerinclude_HEADERS = $(sources:.cpp=.h) libCompilerincludedir = $(includedir)/compbenchmarks/Compiler/Compiler-TCC INCLUDES = -I $(top_srcdir)/libcompbenchmarks --- NEW FILE: Compiler-TCC.cpp --- /* ---------------------------------------------------------------------------- $Id: Compiler-TCC.cpp,v 1.1 2007/01/22 18:24:21 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> using namespace CBM; CompilerTCC::CompilerTCC(System *_system, char *_compilerBinary) : Compiler(_system, _compilerBinary) { } std::string CompilerTCC::compiler(void) { std::string str = "tcc"; return(str); } std::string CompilerTCC::getCompilerName(void) { std::string result = "Tiny C Compiler "; result+=getCompilerVersion(); return(result); } std::string CompilerTCC::getCompilerVersion(void) { std::string cmd; std::string result; cmd+=compilerBinary; cmd+=" -v"; system->exec(cmd, result); /* !!! */ return(result); } char *CompilerTCC::language(void) { return("C"); } CompilerTCC::~CompilerTCC() { } |