Commit d352990d authored by Dario Freddi's avatar Dario Freddi

Make evrything compile and re-add the benchmark

Signed-off-by: default avatarDario Freddi <drf@kde.org>
parent 40719a6e
......@@ -7,20 +7,22 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
set(MAJOR_AKABEI_VERSION 2 CACHE INT "Akabei's major version number" FORCE)
set(MINOR_AKABEI_VERSION 3 CACHE INT "Akabei's minor version number" FORCE)
set(PATCH_AKABEI_VERSION 3 CACHE INT "Akabei's patch version number" FORCE)
set(FIX_AKABEI_VERSION 6 CACHE INT "Akabei's fix version number" FORCE)
set(MAJOR_AKABEI_VERSION 0 CACHE INT "Akabei's major version number" FORCE)
set(MINOR_AKABEI_VERSION 0 CACHE INT "Akabei's minor version number" FORCE)
set(PATCH_AKABEI_VERSION 1 CACHE INT "Akabei's patch version number" FORCE)
set(FIX_AKABEI_VERSION 0 CACHE INT "Akabei's fix version number" FORCE)
set(AKABEI_VERSION_STRING "${MAJOR_AKABEI_VERSION}.${MINOR_AKABEI_VERSION}.${PATCH_AKABEI_VERSION}.${FIX_AKABEI_VERSION}")
# requires minimal Qt 4.4
set(QT_MIN_VERSION "4.4.0")
find_package(Qt4 REQUIRED)
find_package(Sqlite REQUIRED)
include_directories(
${QT_INCLUDES}
${LIBARCHIVE_INCLUDE_DIR}
${SQLITE_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/lib
......
# - Try to find Sqlite
# Once done this will define
#
# SQLITE_FOUND - system has Sqlite
# SQLITE_INCLUDE_DIR - the Sqlite include directory
# SQLITE_LIBRARIES - Link these to use Sqlite
# SQLITE_DEFINITIONS - Compiler switches required for using Sqlite
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES )
# in cache already
SET(Sqlite_FIND_QUIETLY TRUE)
endif ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES )
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if( NOT WIN32 )
find_package(PkgConfig)
pkg_check_modules(PC_SQLITE QUIET sqlite3)
set(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER})
endif( NOT WIN32 )
FIND_PATH(SQLITE_INCLUDE_DIR NAMES sqlite3.h
PATHS
${PC_SQLITE_INCLUDEDIR}
${PC_SQLITE_INCLUDE_DIRS}
)
FIND_LIBRARY(SQLITE_LIBRARIES NAMES sqlite3
PATHS
${PC_SQLITE_LIBDIR}
${PC_SQLITE_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sqlite DEFAULT_MSG SQLITE_INCLUDE_DIR SQLITE_LIBRARIES )
# show the SQLITE_INCLUDE_DIR and SQLITE_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES )
......@@ -27,4 +27,7 @@ set_target_properties(akabeicore PROPERTIES VERSION ${MAJOR_AKABEI_VERSION}.${MI
target_link_libraries(akabeicore
${QT_QTCORE_LIBRARY}
${SQLITE_LIBRARIES}
)
add_subdirectory(benchmarks)
\ No newline at end of file
......@@ -91,3 +91,5 @@ void OperationRunner::cancel()
}
}
#include "akabeioperationrunner.moc"
......@@ -17,4 +17,15 @@ Package::Package(Database *db, int databaseId, const QString &name)
{
}
Package::~Package()
{
}
QString Package::name() const
{
Q_D(const Package);
return d->name;
}
}
add_subdirectory(database)
\ No newline at end of file
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set(DATABASE_BENCHMARK_SRCS
databasebenchmark.cpp
)
qt4_wrap_cpp(DATABASE_BENCHMARK_MOC_SRCS
databasebenchmark.h)
add_executable(databasebenchmark ${DATABASE_BENCHMARK_SRCS} ${DATABASE_BENCHMARK_MOC_SRCS})
target_link_libraries(databasebenchmark akabeicore ${QT_QTTEST_LIBRARY})
\ No newline at end of file
#include "databasebenchmark.h"
#include "../../lib/akabeidatabase.h"
#include "akabeidatabase.h"
void DatabaseBenchmark::benchmark_QueryDatabase()
{
......
......@@ -14,10 +14,30 @@
namespace Akabei {
class PlainInstallOperation::Private
{
public:
};
PlainInstallOperation::PlainInstallOperation(Package *package)
: Operation(package->name())
, d(0)
, d(new Private)
{
}
PlainInstallOperation::~PlainInstallOperation()
{
delete d;
}
void PlainInstallOperation::run()
{
}
void PlainInstallOperation::validate()
{
}
}
......@@ -22,15 +22,12 @@ class PlainInstallOperation : public Operation
Q_DISABLE_COPY(PlainInstallOperation)
public:
explicit PlainInstallOperation(Package *package);
virtual ~PlainInstallOperation();
protected:
void validate();
void run();
signals:
public slots:
private:
class Private;
Private * const d;
......
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