Update of /cvsroot/compbench/CompBenchmarks++/Qt-4
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12203
Modified Files:
main.cpp main.h
Log Message:
Compiler autodetection revisited (part of mechanism moved to libcompbenchmarks/).
Index: main.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** main.cpp 26 Sep 2007 19:13:43 -0000 1.18
--- main.cpp 27 Sep 2007 17:21:49 -0000 1.19
***************
*** 52,109 ****
}
! CompilerAutodetectThread::CompilerAutodetectThread(QObject *parent)
! : QThread(parent)
{
}
! void CompilerAutodetectThread::run()
{
! static int known_compiler_number = 24;
! const char *known_compilers[] = {"/usr/bin/gcc",
! "/usr/bin/tcc",
! "gcc-2.95",
! "gcc-2.96",
! "gcc-3.1",
! "gcc-3.2",
! "gcc-3.3",
! "gcc-3.4",
! "gcc-4.0",
! "gcc-4.1",
! "gcc-4.2",
! "/usr/local/bin/gcc",
! "/usr/local/bin/tcc",
! "/usr/bin/g++",
! "g++-2.95",
! "g++-2.96",
! "g++-3.1",
! "g++-3.2",
! "g++-3.3",
! "g++-3.4",
! "g++-4.0",
! "g++-4.1",
! "g++-4.2",
! "/usr/local/bin/g++"};
! CBM::CompilerSelector SC(CBM::cbmSystem);
! CBM::Compiler *C;
! CBM::UIMsg *msg;
! int i;
! msg=CBM::cbmUI->msgCompilerAutodetect();
!
! for(i=0; i<known_compiler_number; i++) {
! C=SC.select(known_compilers[i]);
! if (C) {
! App->compilerRegister(C);
! }
! msg->setProgress((float) ((i*100.0)/known_compiler_number));
! }
! CBM::cbmUI->outputOK();
! if (parent())
! parent()->deleteLater();
}
! CompilerAutodetectThread::~CompilerAutodetectThread()
{
}
--- 52,83 ----
}
! QSystemCompilerAutodetectThreadManager::QSystemCompilerAutodetectThreadManager()
! : CBM::SystemThreadCompilerAutodetectManager()
{
}
! void QSystemCompilerAutodetectThreadManager::compilerRegister(CBM::Compiler *C)
{
! if (C)
! App->compilerRegister(C);
! }
! QSystemCompilerAutodetectThreadManager::~QSystemCompilerAutodetectThreadManager()
! {
! }
! QCompilerAutodetectThread::QCompilerAutodetectThread()
! : QThread()
! {
! manager=new QSystemCompilerAutodetectThreadManager;
! T=new CBM::SystemThreadCompilerAutodetect(manager);
! }
! void QCompilerAutodetectThread::run(void)
! {
! T->Start();
}
! QCompilerAutodetectThread::~QCompilerAutodetectThread()
{
}
***************
*** 392,398 ****
void Application::doCompilerAutodetect(void)
{
! CompilerAutodetectThread *T;
! T=new CompilerAutodetectThread();
T->start();
}
--- 366,372 ----
void Application::doCompilerAutodetect(void)
{
! QCompilerAutodetectThread *T;
! T=new QCompilerAutodetectThread();
T->start();
}
Index: main.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** main.h 17 Sep 2007 19:38:47 -0000 1.12
--- main.h 27 Sep 2007 17:21:49 -0000 1.13
***************
*** 14,17 ****
--- 14,18 ----
#include <Status/Status-Console.h>
#include <Plan/Plan-Batch.h>
+ #include <System/System-Thread-CompilerAutodetect.h>
namespace CQT {
***************
*** 44,54 ****
};
! class CompilerAutodetectThread : public QThread
{
! Q_OBJECT
public:
! CompilerAutodetectThread(QObject *parent = 0);
virtual void run();
! virtual ~CompilerAutodetectThread();
};
--- 45,65 ----
};
! class QSystemCompilerAutodetectThreadManager : public CBM::SystemThreadCompilerAutodetectManager {
! public:
! QSystemCompilerAutodetectThreadManager();
! virtual void compilerRegister(CBM::Compiler *C);
! virtual ~QSystemCompilerAutodetectThreadManager();
! };
!
! class QCompilerAutodetectThread : public QThread
{
! Q_OBJECT
! protected:
! QSystemCompilerAutodetectThreadManager *manager;
! CBM::SystemThreadCompilerAutodetect *T;
public:
! QCompilerAutodetectThread();
virtual void run();
! virtual ~QCompilerAutodetectThread();
};
|