diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-30 18:25:07 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-02-01 17:12:19 (GMT) |
commit | ed1b12624dfe7f4b6afeb557aabb091904918bc7 (patch) | |
tree | 1910a27d8e1feb51337e216c9296d6265fe013a8 /Tests | |
parent | 2dee9294969ff5ef85a4dacb13de70b8a9de03db (diff) | |
download | CMake-ed1b12624dfe7f4b6afeb557aabb091904918bc7.zip CMake-ed1b12624dfe7f4b6afeb557aabb091904918bc7.tar.gz CMake-ed1b12624dfe7f4b6afeb557aabb091904918bc7.tar.bz2 |
CMakeOnly.AllFindModules: require version for some modules
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeOnly/AllFindModules/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 308177d..127e9d7 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -44,3 +44,25 @@ if (NOT QT4_FOUND) do_find(${FIND_MODULE}) endforeach(FIND_MODULE) endif (NOT QT4_FOUND) + +# If any of these modules reported that it was found a version number should have been +# reported. +set(VERSIONS_REQUIRED + ALSA BISON BZIP2 CUPS CURL DOXYGEN EXPAT FLEX GETTEXT GIF GIT GNUPLOT + ImageMagick JASPER LibArchive LIBXML2 PERL PostgreSQL SWIG TIFF ZLIB) + +foreach(VTEST ${VERSIONS_REQUIRED}) + if (${VTEST}_FOUND) + if (DEFINED ${VTEST}_VERSION_STRING) + if (NOT ${VTEST}_VERSION_STRING MATCHES "^[0-9][0-9\\.]*[A-Za-z_]*[0-9\\.]*$") + message(SEND_ERROR "${VTEST}_VERSION_STRING has unexpected content ${${VTEST}_VERSION_STRING}") + endif() + elseif (DEFINED ${VTEST}_VERSION) + if (NOT ${VTEST}_VERSION MATCHES "^[0-9][0-9\\.]*[A-Za-z_]*[0-9\\.]*$") + message(SEND_ERROR "${VTEST}_VERSION has unexpected content ${${VTEST}_VERSION}") + endif() + else() + message(SEND_ERROR "${VTEST}_FOUND is set but no version number is defined") + endif() + endif(${VTEST}_FOUND) +endforeach(VTEST) |