CMakeOnly.AllFindModules: suppress two modules from testing

FindPackageHandleStandardArgs and FindPackageMessage match the glob
expression but are nothing that will usually be fed into find_package().
This commit is contained in:
Rolf Eike Beer 2012-01-26 22:26:00 +01:00
parent 3c4b4fffd0
commit 2dee929496
1 changed files with 6 additions and 1 deletions

View File

@ -21,12 +21,17 @@ endmacro(do_find)
# is therefore also blocked # is therefore also blocked
set(NO_QT4_MODULES "Qt3" "KDE3") set(NO_QT4_MODULES "Qt3" "KDE3")
# These modules are named Find*.cmake, but are nothing that works in
# find_package().
set(NO_FIND_MODULES "PackageHandleStandardArgs" "PackageMessage")
set(DESIRED_QT_VERSION 4) set(DESIRED_QT_VERSION 4)
foreach(FIND_MODULE ${FIND_MODULES}) foreach(FIND_MODULE ${FIND_MODULES})
string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}") string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}")
list(FIND NO_QT4_MODULES ${MODULE_NAME} NO_QT4_INDEX) list(FIND NO_QT4_MODULES ${MODULE_NAME} NO_QT4_INDEX)
if (NO_QT4_INDEX EQUAL -1) list(FIND NO_FIND_MODULES ${MODULE_NAME} NO_FIND_INDEX)
if (NO_QT4_INDEX EQUAL -1 AND NO_FIND_INDEX EQUAL -1)
do_find(${MODULE_NAME}) do_find(${MODULE_NAME})
endif () endif ()