summaryrefslogtreecommitdiffstats
path: root/Modules/FindSquish.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-14 12:31:45 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-14 12:31:45 (GMT)
commitcd3bd23266a4a6c00595134a17a8bdaea9e28af5 (patch)
tree515fcf4fdee211067497339acb52de321640c4fc /Modules/FindSquish.cmake
parent9acb4f118cd9a52aaa66897b1c0cd11dace3851c (diff)
parent68bc863d5bd64f3e893722e403d4fd56bd2e175a (diff)
downloadCMake-cd3bd23266a4a6c00595134a17a8bdaea9e28af5.zip
CMake-cd3bd23266a4a6c00595134a17a8bdaea9e28af5.tar.gz
CMake-cd3bd23266a4a6c00595134a17a8bdaea9e28af5.tar.bz2
Merge topic 'cleanup-style'
68bc863 Merge branch 'master' into cleanup-style a05eba5 CMakeVersion.bash: Update sed expression for lower-case 'set' 3c0488d Fix WarnUnusedUnusedViaUnset test pass/fail regex 6c2c483 Remove trailing TAB from NSIS.template.in 9db3116 Remove CMake-language block-end command arguments 77543bd Convert CMake-language commands to lower case 7bbaa42 Remove trailing whitespace from most CMake and C/C++ code be9db98 Merge topic 'watcom-compiler-version' af42ae4 Watcom: Simplify compiler version detection (#11866)
Diffstat (limited to 'Modules/FindSquish.cmake')
-rw-r--r--Modules/FindSquish.cmake100
1 files changed, 50 insertions, 50 deletions
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index 48d195a..b44ba70 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -16,11 +16,11 @@
# macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)
#
# ---- Typical Use
-# ENABLE_TESTING()
-# FIND_PACKAGE(Squish)
-# IF (SQUISH_FOUND)
+# enable_testing()
+# find_package(Squish)
+# if (SQUISH_FOUND)
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
-# ENDIF (SQUISH_FOUND)
+# endif ()
#
#=============================================================================
@@ -36,24 +36,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
-SET(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
-SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
+set(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
+set(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
+set(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
# Search only if the location is not already known.
-IF(NOT SQUISH_INSTALL_DIR)
+if(NOT SQUISH_INSTALL_DIR)
# Get the system search path as a list.
- FILE(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2)
+ file(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
- SET(SQUISH_INSTALL_DIR_SEARCH "")
- FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2})
- SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
- ENDFOREACH(dir)
- STRING(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}")
+ set(SQUISH_INSTALL_DIR_SEARCH "")
+ foreach(dir ${SQUISH_INSTALL_DIR_SEARCH2})
+ set(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
+ endforeach()
+ string(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}")
# Look for an installation
- FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner
+ find_path(SQUISH_INSTALL_DIR bin/squishrunner
# Look for an environment variable SQUISH_INSTALL_DIR.
$ENV{SQUISH_INSTALL_DIR}
@@ -65,49 +65,49 @@ IF(NOT SQUISH_INSTALL_DIR)
DOC "The ${SQUISH_INSTALL_DIR_STRING}"
)
-ENDIF(NOT SQUISH_INSTALL_DIR)
+endif()
# search for the executables
-IF(SQUISH_INSTALL_DIR)
- SET(SQUISH_INSTALL_DIR_FOUND 1)
+if(SQUISH_INSTALL_DIR)
+ set(SQUISH_INSTALL_DIR_FOUND 1)
# find the client program
- IF(NOT SQUISH_CLIENT_EXECUTABLE)
- FIND_PROGRAM(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
- ENDIF(NOT SQUISH_CLIENT_EXECUTABLE)
+ if(NOT SQUISH_CLIENT_EXECUTABLE)
+ find_program(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
+ endif()
# find the server program
- IF(NOT SQUISH_SERVER_EXECUTABLE)
- FIND_PROGRAM(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
- ENDIF(NOT SQUISH_SERVER_EXECUTABLE)
+ if(NOT SQUISH_SERVER_EXECUTABLE)
+ find_program(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
+ endif()
-ELSE(SQUISH_INSTALL_DIR)
- SET(SQUISH_INSTALL_DIR_FOUND 0)
-ENDIF(SQUISH_INSTALL_DIR)
+else()
+ set(SQUISH_INSTALL_DIR_FOUND 0)
+endif()
# record if executables are set
-IF(SQUISH_CLIENT_EXECUTABLE)
- SET(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
-ELSE(SQUISH_CLIENT_EXECUTABLE)
- SET(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
-ENDIF(SQUISH_CLIENT_EXECUTABLE)
-
-IF(SQUISH_SERVER_EXECUTABLE)
- SET(SQUISH_SERVER_EXECUTABLE_FOUND 1)
-ELSE(SQUISH_SERVER_EXECUTABLE)
- SET(SQUISH_SERVER_EXECUTABLE_FOUND 0)
-ENDIF(SQUISH_SERVER_EXECUTABLE)
+if(SQUISH_CLIENT_EXECUTABLE)
+ set(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
+else()
+ set(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
+endif()
+
+if(SQUISH_SERVER_EXECUTABLE)
+ set(SQUISH_SERVER_EXECUTABLE_FOUND 1)
+else()
+ set(SQUISH_SERVER_EXECUTABLE_FOUND 0)
+endif()
# record if Squish was found
-SET(SQUISH_FOUND 1)
-FOREACH(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
- IF(NOT ${var})
- SET(SQUISH_FOUND 0)
- ENDIF(NOT ${var})
-ENDFOREACH(var)
-
-MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
- ADD_TEST(${testName}
+set(SQUISH_FOUND 1)
+foreach(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
+ if(NOT ${var})
+ set(SQUISH_FOUND 0)
+ endif()
+endforeach()
+
+macro(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
+ add_test(${testName}
${CMAKE_COMMAND} -V -VV
"-Dsquish_aut:STRING=${testAUT}"
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
@@ -118,8 +118,8 @@ MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
"-Dsquish_wrapper:STRING=${testWraper}"
-P "${CMAKE_ROOT}/Modules/SquishTestScript.cmake"
)
- SET_TESTS_PROPERTIES(${testName}
+ set_tests_properties(${testName}
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL"
)
-ENDMACRO(SQUISH_ADD_TEST)
-
+endmacro()
+