Commit 3205756e authored by Daniele Cocca's avatar Daniele Cocca
Browse files

Final adjustments after the rebase.

parent 4416cba7
add_subdirectory(benchmarks)
find_package(Qt4 REQUIRED)
find_package(Sqlite REQUIRED)
set(AKABEI_CORE_INCLUDE
......@@ -15,8 +16,10 @@ set(AKABEI_CORE_LIBRARIES
include_directories(${AKABEI_CORE_INCLUDE}
${CMAKE_CURRENT_BINARY_DIR})
set(AKABEI_SQLITE_SRCS
SQLiteConnection.cpp)
set(AKABEI_CORE_SRCS
SQLiteConnection.cpp
akabeibackend.cpp
akabeiconfig.cpp
akabeidelta.cpp
......@@ -32,18 +35,10 @@ akabeipackage.cpp
akabeirunnerrunnable_p.cpp
akabeivalidatorrunnable_p.cpp
md5.c
)
set(AKABEI_SQLITE_SRCS
sqlite3++/SQLiteConnection.cpp
)
${AKABEI_SQLITE_SRCS})
set(AKABEI_OPERATION_SRCS
<<<<<<< HEAD
operations/akabeiplainhookoperation.cpp
=======
#operations/akabeiplainhookoperation.cpp
>>>>>>> Fixed the CMakeLists.txt for the sqlite3++ wrapper. Added some "FIXME" tags here and there. Code is still not compiling.
operations/akabeiplainreinstalloperation.cpp
operations/akabeiplaininstalloperation.cpp
operations/akabeiplainremoveoperation.cpp
......@@ -51,8 +46,10 @@ operations/akabeiplainscriptletoperation.cpp
operations/akabeiplainupgradeoperation.cpp
)
set(AKABEI_SQLITE_HDRS
SQLiteConnection.h)
set(AKABEI_CORE_HDRS
SQLiteConnection.h
akabeibackend.h
akabeiconfig.h
akabeidelta.h
......@@ -65,11 +62,7 @@ akabeioperation.h
akabeioperationrunner.h
akabeipackage.h
akabeicore_global.h
)
set(AKABEI_SQLITE_HDRS
sqlite3++/SQLiteConnection.h
)
${AKABEI_SQLITE_HDRS})
set(AKABEI_OPERATION_HDRS
operations/akabeiplainreinstalloperation.h
......@@ -102,9 +95,8 @@ target_link_libraries(akabeicore
install(TARGETS akabeicore DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(FILES ${AKABEI_CORE_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR})
install(FILES ${AKABEI_OPERATION_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR}/operations)
install(FILES ${AKABEI_SQLITE_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR}/sqlite3++)
add_subdirectory(benchmarks)
add_subdirectory(tests)
#add_subdirectory(sqlite3++)
install(FILES ${AKABEI_SQLITE_HDRS} DESTINATION ${INCLUDES_INSTALL_DIR}/sqlite3++)
......@@ -15,6 +15,7 @@
#include "akabeibackend_p.h"
#include "akabeihelpers_p.h"
#include "akabeidelta_p.h"
#include "akabeihook_p.h"
namespace Akabei {
......@@ -22,12 +23,11 @@ DatabasePrivate::DatabasePrivate(Database *db, const QString &pathToDatabase)
try
: q_ptr(db)
, pathToDb(pathToDatabase)
, dbConnection(pathToDb, false)
, valid(true)
, mutex(new QMutex())
, dbConnection(pathToDb, false)
{
} catch (SQLiteException& e)
{
} catch (SQLiteException& e) {
qDebug() << e.what();
valid = false;
}
......@@ -255,9 +255,9 @@ Delta *DatabasePrivate::deltaFromRow(SQLiteResource& table, int row)
return delta;
}
Hook *DatabasePrivate::hookFromRow(sqlite3_stmt *stmt)
Hook* DatabasePrivate::hookFromRow(SQLiteResource& table, int row)
{
const QString name = QSTRING_FROM_DB(stmt, Tables::Hooks::NAME);
const QString name = table.getDataAt(row, "name").toString();
//Check if the deltaCache contains the dle
if (hookCache.contains(name))
......@@ -265,12 +265,12 @@ Hook *DatabasePrivate::hookFromRow(sqlite3_stmt *stmt)
using namespace Tables::Hooks;
QStringList pkgs = Helpers::stringlistFromDb(stmt, PACKAGES);
QStringList pkgs = Helpers::stringlistFromDb(table.getDataAt(row, "packages").toString());
QList<Akabei::Package*> aPkgs;
foreach (const QString &p, pkgs)
aPkgs << packageCache[p.toInt()];
const QString &h = QSTRING_FROM_DB(stmt, HOOK);
const QString &h = table.getDataAt(row, "hook").toString();
// Otherwise go ahead, create the delta, add it to the cache, and return it.
Hook *hook = new Hook(name, h, aPkgs);
......@@ -402,5 +402,27 @@ QList<Delta*> Database::queryDeltas(const QString &sql)
}
return retlist;
}
QList<Hook*> Database::queryHooks(const QString &sql)
{
Q_D(Database);
QMutexLocker locker(d->mutex);
QList<Hook*> retlist;
try
{
SQLiteResource table = d->dbConnection.query(sql);
for (int i = 0; i < table.getRowsCount(); i++)
{
retlist << d->hookFromRow(table, i);
}
}
catch (SQLiteException& e)
{
qDebug() << "Error while querying database for hooks: " << e.what();
}
return retlist;
}
}
......@@ -37,6 +37,7 @@ public:
Package *packageFromRow(SQLiteResource&, int);
Group *groupFromRow(SQLiteResource&, int);
Delta *deltaFromRow(SQLiteResource&, int);
Hook* hookFromRow(SQLiteResource&, int);
QString pathToDb;
SQLiteConnection dbConnection;
......
......@@ -67,4 +67,4 @@ QList< Package* > Group::search(const QString& token)
return e.result();
}
}
......@@ -522,7 +522,7 @@ QString unversionedTarget(const QString& target)
}
}
QStringList stringlistFromDb(QString &dbstr)
QStringList stringlistFromDb(QString dbstr)
{
QStringList retlist = dbstr.split(';');
......@@ -957,6 +957,47 @@ int QueryPerformer::updatePackage(SQLiteConnection &dbConnection, Package* from,
return SQLITE_OK;
}
int QueryPerformer::insertDelta(Akabei::Database* db, Akabei::Delta const* delta, int packageId)
{
DatabasePrivate *d = QueryHelper::databasePrivateFromDatabase(db);
return insertDelta(d->dbConnection, delta, packageId);
}
int QueryPerformer::insertDelta(SQLiteConnection& dbConnection, Akabei::Delta const* delta, int packageId)
{
try {
dbConnection.query(QString("INSERT INTO delta (`package`, `filename`, `versionfrom`, `versionto`, `md5sum`) "
"VALUES (%1, %2, %3, %4, %5);")
.arg(packageId)
.arg(delta->filename())
.arg(QString::fromAscii(delta->versionFrom()))
.arg(QString::fromAscii(delta->versionTo()))
.arg(QString::fromAscii(delta->md5sum())));
} catch (SQLiteException& ex) {
return SQLITE_ABORT;
}
return SQLITE_OK;
}
int QueryPerformer::removeDeltas(Akabei::Database *db, Package const* p)
{
DatabasePrivate *d = QueryHelper::databasePrivateFromDatabase(db);
return removeDeltas(d->dbConnection, p);
}
int QueryPerformer::removeDeltas(SQLiteConnection &dbConnection, Package const* p)
{
try {
dbConnection.bind(":Package", p->databaseId());
dbConnection.query("DELETE FROM deltas WHERE package = :Package");
} catch (SQLiteException& ex) {
return SQLITE_ABORT;
}
return SQLITE_OK;
}
int QueryPerformer::insertFiles(Database *db, Package* p, const QString& prefix)
{
DatabasePrivate *d = QueryHelper::databasePrivateFromDatabase(db);
......@@ -970,7 +1011,7 @@ int QueryPerformer::insertFiles(SQLiteConnection &dbConnection, Package* p, cons
try {
foreach (QString file, p->retrieveFiles())
{
sqlQuery = "INSERT INTO files ('Package', 'Files', 'Prefix') VALUES (" + QString::number(p->databaseId()) + ", '" + file + "', '" + prefix + "');";
sqlQuery = "INSERT INTO files ('package', 'files', 'prefix') VALUES (" + QString::number(p->databaseId()) + ", '" + file + "', '" + prefix + "');";
dbConnection.query(sqlQuery);
}
} catch (SQLiteException& e) {
......@@ -1028,17 +1069,27 @@ int QueryPerformer::removeFiles(SQLiteConnection &dbConnection, Package* p)
return SQLITE_OK;
}
int QueryPerformer::insertHook(Database *db, const QString& hook, QList<Package*> p)
int QueryPerformer::insertHook(Database *db, Akabei::Hook const* hook)
{
DatabasePrivate *d = QueryHelper::databasePrivateFromDatabase(db);
return insertHook(d->dbConnection, hook, p);
return insertHook(d->dbConnection, hook);
}
int QueryPerformer::insertHook(SQLiteConnection &dbConnection, const QString& hook, QList< Package* > p)
int QueryPerformer::insertHook(SQLiteConnection &dbConnection, Akabei::Hook const* hook)
{
Q_UNUSED(dbConnection)
Q_UNUSED(hook)
Q_UNUSED(p)
QStringList pkgs;
foreach (Package* p, hook->packages()) {
pkgs << QString::number(p->databaseId());
}
try {
dbConnection.bind(":Name", hook->name());
dbConnection.bind(":Hook", hook->content());
dbConnection.bind(":Packages", stringFromStringList(pkgs));
dbConnection.query("INSERT INTO hooks (`name`, `hook`, `packages`) VALUES (:Name, :Hook, :Packages)");
} catch (SQLiteException& ex) {
return SQLITE_ABORT;
}
return SQLITE_OK;
}
......
......@@ -62,6 +62,12 @@ namespace QueryPerformer
int AKABEICORESHARED_EXPORT insertGroup(Akabei::Database *db, Group *g);
int AKABEICORESHARED_EXPORT insertGroup(SQLiteConnection &, Group *g);
int AKABEICORESHARED_EXPORT insertDelta(Akabei::Database *db, Delta const *delta, int packageId);
int AKABEICORESHARED_EXPORT insertDelta(SQLiteConnection &, Delta const *delta, int packageId);
int AKABEICORESHARED_EXPORT removeDeltas(Akabei::Database *db, Package const* p);
int AKABEICORESHARED_EXPORT removeDeltas(SQLiteConnection &, Package const* p);
int AKABEICORESHARED_EXPORT insertFiles(Akabei::Database *db, Package *p, const QString &prefix);
int AKABEICORESHARED_EXPORT insertFiles(SQLiteConnection &, Package *p, const QString &prefix);
......@@ -80,8 +86,8 @@ namespace QueryPerformer
int AKABEICORESHARED_EXPORT removeScriptlet(Akabei::Database *db, Package *p);
int AKABEICORESHARED_EXPORT removeScriptlet(SQLiteConnection &, Package *p);
int AKABEICORESHARED_EXPORT insertHook(Akabei::Database *db, const QString &hook, QList<Package*> p);
int AKABEICORESHARED_EXPORT insertHook(SQLiteConnection &, const QString& hook, QList<Package*> p);
int AKABEICORESHARED_EXPORT insertHook(Akabei::Database *db, Hook const* hook);
int AKABEICORESHARED_EXPORT insertHook(SQLiteConnection &, Hook const* hook);
}
class PackageEventLoop : public QEventLoop
......
......@@ -22,7 +22,7 @@ namespace Helpers
{
char *archive_file_readline(archive* a, char* line);
int compare_versions(const char *a, const char *b);
QStringList stringlistFromDb(QString &);
QStringList stringlistFromDb(QString);
QStringList filesFromDb(SQLiteResource &);
}
}
......
......@@ -14,7 +14,7 @@
#include "akabeihook.h"
class QTemporaryFile;
#include <QTemporaryFile>
namespace Akabei {
......@@ -32,7 +32,7 @@ class HookPrivate {
QString name;
QString content;
QList<Akabei::Package*> packages;
QTemporaryFile * file;
};
......
......@@ -576,17 +576,6 @@ Delta* Package::retrieveDeltaTo(const Akabei::Package::Version& version)
return d->deltaCache[version];//FIXME: No need to do deltaCache with version... just do the same way as retrieveDeltaFrom
}
Delta* Package::retrieveDeltaFrom(const Version &version)
{
Q_D(const Package);
retrieveDeltas();
foreach (Delta *del, d->deltaCache.values()) {
if (Version(del->versionFrom()) == version)
return del;
}
return 0;
}
QDateTime Package::installDate() const
{
Q_D(const Package);
......
SET(CMAKE_C_COMPILER "/usr/bin/gcc")
SET(CMAKE_C_COMPILER_ARG1 "")
SET(CMAKE_C_COMPILER_ID "GNU")
SET(CMAKE_C_PLATFORM_ID "Linux")
SET(CMAKE_AR "/usr/bin/ar")
SET(CMAKE_RANLIB "/usr/bin/ranlib")
SET(CMAKE_LINKER "/usr/bin/ld")
SET(CMAKE_COMPILER_IS_GNUCC 1)
SET(CMAKE_C_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW )
SET(CMAKE_COMPILER_IS_CYGWIN )
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
SET(CMAKE_C_SIZEOF_DATA_PTR "8")
SET(CMAKE_C_COMPILER_ABI "ELF")
IF(CMAKE_C_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
IF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
ENDIF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_C_HAS_ISYSROOT "")
SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c")
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0;/usr/lib;/lib")
SET(CMAKE_CXX_COMPILER "/usr/bin/c++")
SET(CMAKE_CXX_COMPILER_ARG1 "")
SET(CMAKE_CXX_COMPILER_ID "GNU")
SET(CMAKE_CXX_PLATFORM_ID "Linux")
SET(CMAKE_AR "/usr/bin/ar")
SET(CMAKE_RANLIB "/usr/bin/ranlib")
SET(CMAKE_LINKER "/usr/bin/ld")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
SET(CMAKE_CXX_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW )
SET(CMAKE_COMPILER_IS_CYGWIN )
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
SET(CMAKE_CXX_SIZEOF_DATA_PTR "8")
SET(CMAKE_CXX_COMPILER_ABI "ELF")
IF(CMAKE_CXX_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
IF(CMAKE_CXX_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
ENDIF(CMAKE_CXX_COMPILER_ABI)
SET(CMAKE_CXX_HAS_ISYSROOT "")
SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c")
SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0;/usr/lib;/lib")
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/shainer/source/akabei/akabeicore/lib/sqlite3++")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/shainer/source/akabei/akabeicore/lib/sqlite3++")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file search paths:
SET(CMAKE_C_INCLUDE_PATH
"."
"usr/include"
"/usr/include/KDE"
"/usr/include/QtXmlPatterns"
"/usr/include/QtXml"
"/usr/include/QtWebKit"
"/usr/include/QtUiTools"
"/usr/include/QtTest"
"/usr/include/QtSvg"
"/usr/include/QtSql"
"/usr/include/QtScriptTools"
"/usr/include/QtScript"
"/usr/include/QtOpenGL"
"/usr/include/QtNetwork"
"/usr/include/QtMultimedia"
"/usr/include/QtHelp"
"/usr/include/QtDesigner"
"/usr/include/QtDeclarative"
"/usr/include/QtDBus"
"/usr/include/Qt3Support"
"/usr/include/QtGui"
"/usr/include/QtCore"
"/usr/include/Qt"
"/usr/share/qt/mkspecs/default"
)
SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
# The C and CXX include file regular expressions for this directory.
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o
/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o -c /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:25: error: ‘Q_WS_WIN’ undeclared (first use in this function)
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:25: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2
File /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <QtCore/qglobal.h>
void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_WIN
cmakeRequireSymbol(0,&Q_WS_WIN);
#endif
return 0;
}
Determining if the Q_WS_QWS exist failed with the following output:
Change Dir: /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o
/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o -c /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:25: error: ‘Q_WS_QWS’ undeclared (first use in this function)
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:25: note: each undeclared identifier is reported only once for each function it appears in
make[1]: Leaving directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o] Error 1
make: *** [cmTryCompileExec/fast] Error 2
File /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <QtCore/qglobal.h>
void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_QWS
cmakeRequireSymbol(0,&Q_WS_QWS);
#endif
return 0;
}
Determining if the Q_WS_MAC exist failed with the following output:
Change Dir: /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o
/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o -c /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:25: error: ‘Q_WS_MAC’ undeclared (first use in this function)
/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:25: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2
File /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <QtCore/qglobal.h>
void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_MAC
cmakeRequireSymbol(0,&Q_WS_MAC);
#endif
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o
/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -o cmTryCompileExec -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
make[1]: Leaving directory `/home/shainer/source/akabei/akabeicore/lib/sqlite3++/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec] Error 1
make: *** [cmTryCompileExec/fast] Error 2
This diff is collapsed.
# Hashes of file build rules.
8885a38d79be455390c643706dca4b42 CMakeFiles/sqlite3++_automoc
1c97a82a064ee7512de3afedd4e3bb0f CMakeFiles/uninstall
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment