summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-01-16 22:37:13 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-01-16 22:37:13 (GMT)
commitec631d5043faa1c307e6c6a29108664a47066e5d (patch)
treec61c1adb1c7999cae2e92b56ad0f21054e6030a3 /Tests
parent6856b4d19d85a9f72354744b5118e2946a90da45 (diff)
downloadCMake-ec631d5043faa1c307e6c6a29108664a47066e5d.zip
CMake-ec631d5043faa1c307e6c6a29108664a47066e5d.tar.gz
CMake-ec631d5043faa1c307e6c6a29108664a47066e5d.tar.bz2
add a test that loops through most Find* modules
This allows easy spotting of modules that output crappy messages and the like.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/AllFindModules/CMakeLists.txt25
-rw-r--r--Tests/CMakeOnly/CMakeLists.txt2
2 files changed, 27 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
new file mode 100644
index 0000000..e825a68
--- /dev/null
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required (VERSION 2.8)
+project(AllFindModules)
+
+if (POLICY CMP0017)
+ cmake_policy(SET CMP0017 NEW)
+endif ()
+
+file(GLOB FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/Find*.cmake" )
+
+foreach(FIND_MODULE ${FIND_MODULES})
+ string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}")
+
+ # It is only possible to use either Qt3 or Qt4 in one project.
+ # Since FindQt will complain if both are found we explicitely
+ # filter out this and FindQt3. FindKDE3 also depends on Qt3 and
+ # is therefore also blocked
+
+ if (NOT MODULE_NAME STREQUAL "Qt" AND
+ NOT MODULE_NAME STREQUAL "Qt3" AND
+ NOT MODULE_NAME STREQUAL "KDE3")
+ message(STATUS " Checking Find${MODULE_NAME}")
+ find_package(${MODULE_NAME})
+ endif ()
+
+endforeach(FIND_MODULE)
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt
index f6aa9b5..20e6a3a 100644
--- a/Tests/CMakeOnly/CMakeLists.txt
+++ b/Tests/CMakeOnly/CMakeLists.txt
@@ -14,3 +14,5 @@ set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT 90)
add_CMakeOnly_test(CheckSymbolExists)
add_CMakeOnly_test(CheckCXXSymbolExists)
+
+add_CMakeOnly_test(AllFindModules)