First solution - common files in src directory, two main.cpp files in subdirs of src.
In pro file You have :
SOURCES += ../src/*.cpp
SOURCES += ../src/subdir/main.cpp
Second solution - one main.cpp with conditional compilation.
First solution - common files in src directory, two main.cpp files in subdirs of src.
In pro file You have :
SOURCES += ../src/*.cpp
SOURCES += ../src/subdir/main.cpp
Second solution - one main.cpp with conditional compilation.
Is there any official or good template for projects with unit testing? In Qt documentation i have not found any information about that how to join main project with unit testing. Whether it should be 2 completely separated projects? Or as I use in example above - subdirs template?
Scope (23rd July 2016)
I also found information that QtCeator sinve 4.0 version has feature called "Autotest integration". It sound promising
http://doc-snapshots.qt.io/qtcreator...-autotest.html
Bookmarks