Error on executing "qmake ; make"
Hello. ( I use KUbuntu 16.04 and Qt Creator 3.6.1 based on Qt 5.6.0)
I've been trying to run tests. My tests exists in digikam-software-compilation/core/tests/database folder
I go to the above folder in terminal and run "qmake ; make" command. A database.pro file is created.
Code:
######################################################################
# Automatically generated by qmake (2.01a) Tue Jun 14 14:57:30 2016
######################################################################
CONFIG+=qtestlib
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += /home/swati/digikam-software-compilation/core/libs/database/coredb/
# Input
HEADERS += databasefieldstest.h databasetagstest.h
SOURCES += databasefieldstest.cpp databasetagstest.cpp testdatabase.cpp
Now, there was only one file ( #include "coredbfields.h") in databasefieldstest.cpp and for that I've already added the path in INCLUDEPATH above.
If I run "qmake ; make" again, I get error for the files included in the include file i.e "coredbfields.h"
I tried to include that file too, i again gave error for the next included file.... This way I'm getting recursive errors.
Please tell me how to fix this?
I want to implement unit tests.
Re: Error on executing "qmake ; make"
If there was no .pro file in that directory, then it might be that it can't be built stand alone.
Looks for the program's main build file.
Since this is DigiKam there might be a CMakeLists.txt at the top level of the source dir.
Cheers,
_
Re: Error on executing "qmake ; make"
Yes, there exists a CMakeLists.txt file in the same directory...
How would it help?
Please tell. I'm doing it for first time.
Re: Error on executing "qmake ; make"
CMake, like qmake, is a build system generator.
Its input files are not .pro files but CMakeLists.txt files.
QtCreator can load those as well.
On the command line it would be like this:
For building in the source directory, i.e. the dir CMakeLists.txt is in
For building inside a sibdirectory of the source directory
For building outside the source directory, e.g. a separate build dir as a sibling directory of the source dir
Cheers,
_