From 3cd70c11bc7bbe3c5e9e4972d2273cf51bbdc30e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 25 Jun 2014 12:46:41 +0200 Subject: [PATCH] CMake: Allow modules to specify the location of tests. Webkit has a different layout, so allow the tests to be found in the appropriate location. Change-Id: Iedbea6daada98a3c3efdbcfc1fe4df5d2c8cea6a Reviewed-by: Oswald Buddenhagen --- mkspecs/features/create_cmake.prf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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.") +}