aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-11-14 20:55:01 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-11-14 20:55:01 +0000
commitf56b4fe57bccfb3bc5611bf75c8fb54c02bcd48c (patch)
treecfc3baf358b5671211b330891c80cde8eb198012
parentde54277a5fca412232a166928233861106c99f7a (diff)
downloadextra-cmake-modules-f56b4fe57bccfb3bc5611bf75c8fb54c02bcd48c.tar.gz
extra-cmake-modules-f56b4fe57bccfb3bc5611bf75c8fb54c02bcd48c.tar.bz2
-add a test for FindBlitz.cmake
-change output prefix from ">>" to "::" (doesn't have to be quoted when grepping) -add option CLEAN_DIRS to RunAllModuleTests.cmake, if you set this to TRUE, the previous test build directories will be removed before running the tests Alex svn path=/trunk/KDE/kdelibs/; revision=884400
-rw-r--r--modules-tests/Blitz/CMakeLists.txt5
-rw-r--r--modules-tests/RunAllModuleTests.cmake8
-rw-r--r--modules-tests/TestFindPackage.cmake14
3 files changed, 18 insertions, 9 deletions
diff --git a/modules-tests/Blitz/CMakeLists.txt b/modules-tests/Blitz/CMakeLists.txt
new file mode 100644
index 00000000..ef81e4df
--- /dev/null
+++ b/modules-tests/Blitz/CMakeLists.txt
@@ -0,0 +1,5 @@
+include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake")
+
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" )
+
+test_find_package(Blitz BLITZ INCLUDES LIBRARIES)
diff --git a/modules-tests/RunAllModuleTests.cmake b/modules-tests/RunAllModuleTests.cmake
index 537072c1..3e529a96 100644
--- a/modules-tests/RunAllModuleTests.cmake
+++ b/modules-tests/RunAllModuleTests.cmake
@@ -1,13 +1,16 @@
# run this script via "cmake -P RunAllModuletests.cmake" to
# execute all module tests in one go.
# To see only the results and not the other cmake output,
-# you can grep for ">>".
+# you can grep for "::".
+# To have it delete the previous test build dirs, run it with -DCLEAN_DIRS=TRUE
get_filename_component(currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(execute_one_test name)
set(workingDir "${currentDir}/${name}/build")
- file(REMOVE_RECURSE "${workingDir}")
+ if(CLEAN_DIRS)
+ file(REMOVE_RECURSE "${workingDir}")
+ endif(CLEAN_DIRS)
file(MAKE_DIRECTORY "${workingDir}")
execute_process(COMMAND ${CMAKE_COMMAND} "${currentDir}/${name}"
WORKING_DIRECTORY "${workingDir}")
@@ -16,5 +19,6 @@ endfunction(execute_one_test)
execute_one_test(Xine)
execute_one_test(Flex)
execute_one_test(QCA2)
+execute_one_test(Blitz)
diff --git a/modules-tests/TestFindPackage.cmake b/modules-tests/TestFindPackage.cmake
index 1a1bf8fe..d176938f 100644
--- a/modules-tests/TestFindPackage.cmake
+++ b/modules-tests/TestFindPackage.cmake
@@ -17,19 +17,19 @@ cmake_minimum_required(VERSION 2.6.2)
cmake_policy(SET CMP0000 OLD)
macro(TEST_FIND_PACKAGE package prefix )
- message(STATUS ">> ***** Testing Find${package}.cmake *****")
+ message(STATUS ":: ***** Testing Find${package}.cmake *****")
find_package(${package})
- message(STATUS ">> ***** Results from Find${package}.cmake *****")
+ message(STATUS ":: ***** Results from Find${package}.cmake *****")
if ( ${prefix}_FOUND)
- message(STATUS ">> Find${package}.cmake: ${package} has been found")
+ message(STATUS ":: Find${package}.cmake: ${package} has been found")
else ( ${prefix}_FOUND)
- message(STATUS ">> Find${package}.cmake: ${package} has NOT been found !")
+ message(STATUS ":: Find${package}.cmake: ${package} has NOT been found !")
endif ( ${prefix}_FOUND)
- message(STATUS "${prefix}_FOUND: \"${${prefix}_FOUND}\"")
+ message(STATUS ":: ${prefix}_FOUND: \"${${prefix}_FOUND}\"")
foreach(var ${ARGN})
- message(STATUS ">> ${prefix}_${var}: \"${${prefix}_${var}}\"")
+ message(STATUS ":: ${prefix}_${var}: \"${${prefix}_${var}}\"")
endforeach(var)
- message(STATUS ">> ***** Done *****")
+ message(STATUS ":: ***** Done *****")
endmacro(TEST_FIND_PACKAGE package)