Exclude tst_selftests when feature process is disabled

- It should not be built for systems without process feature.

Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tatiana Borisova 2022-01-21 16:25:55 +02:00
parent 75082c9f20
commit e76d27d3ed
2 changed files with 2 additions and 8 deletions

View File

@ -4,7 +4,7 @@
# add_subdirectory(outformat) # special case missing project # add_subdirectory(outformat) # special case missing project
add_subdirectory(qsignalspy) add_subdirectory(qsignalspy)
# QTBUG-88507 # special case # QTBUG-88507 # special case
if(NOT ANDROID) if(QT_FEATURE_process AND NOT ANDROID)
add_subdirectory(selftests) add_subdirectory(selftests)
endif() endif()
if(TARGET Qt::Widgets) if(TARGET Qt::Widgets)

View File

@ -29,7 +29,7 @@
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#if QT_CONFIG(process) QT_REQUIRE_CONFIG(process);
#if QT_CONFIG(temporaryfile) #if QT_CONFIG(temporaryfile)
# define USE_DIFF # define USE_DIFF
@ -1216,15 +1216,10 @@ SCENARIO("Test output of the loggers is as expected")
} }
} }
#endif // QT_CONFIG(process)
// ----------------------- Entrypoint ----------------------- // ----------------------- Entrypoint -----------------------
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
#if !QT_CONFIG(process)
return 0;
#else
std::vector<const char*> args(argv, argv + argc); std::vector<const char*> args(argv, argv + argc);
static auto kRebaseArgument = "--rebase"; static auto kRebaseArgument = "--rebase";
@ -1272,6 +1267,5 @@ int main(int argc, char **argv)
} }
return result; return result;
#endif
} }