From 796c618cccf9bc1887ff3ca297d3f69fce0fcb75 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 9 Aug 2013 20:34:29 +0200 Subject: [PATCH] blacklist tests with their own test in Tests/Module from AllFindModules test --- Tests/CMakeOnly/AllFindModules/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 739593cc9a..691728aa97 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -22,11 +22,18 @@ endmacro() set(DESIRED_QT_VERSION 4) set(NO_QT4_MODULES "Qt3" "KDE3") +# ignore everything that has it's own test in Tests/Module/ +file(GLOB OWN_TEST_MODULES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../../Module/" "${CMAKE_CURRENT_SOURCE_DIR}/../../Module/Find*") +foreach(FIND_MODULE IN LISTS OWN_TEST_MODULES) + string(REGEX REPLACE "^Find" "" _MOD_NAME "${FIND_MODULE}") + list(APPEND NO_FIND_MODULES "${_MOD_NAME}") +endforeach() + # These modules are named Find*.cmake, but are nothing that works in # find_package(). -set(NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage") +list(APPEND NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage") -foreach(FIND_MODULE ${FIND_MODULES}) +foreach(FIND_MODULE IN LISTS FIND_MODULES) string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}") list(FIND NO_QT4_MODULES ${MODULE_NAME} NO_QT4_INDEX)