diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index abd8009288..2533b7b8d6 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -292,4 +292,13 @@ exists($$cmake_macros_file.input) { cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} -!exists($$MODULE_BASE_INDIR/tests/auto/cmake): error("Missing CMake tests.") +# We are generating cmake files. Most developers of Qt are not aware of cmake, +# so we require automatic tests to be available. The only module which should +# set CMAKE_MODULE_TESTS to '-' is enginio because that is known to be broken. +# Other modules should either create proper tests in tests/auto/cmake or, as +# a temporary measure, disable the generation of cmake files +# with 'CONFIG -= create_cmake' +!equals(CMAKE_MODULE_TESTS, -) { + isEmpty(CMAKE_MODULE_TESTS): CMAKE_MODULE_TESTS = $$MODULE_BASE_INDIR/tests/auto/cmake + !exists($$CMAKE_MODULE_TESTS): error("Missing CMake tests.") +}