summaryrefslogtreecommitdiff
path: root/Modules/FindSquish.cmake
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
commit915c76ded744c0f5f151402b9fa69f3fd8452573 (patch)
treeca6a387466543248890f346847acaa8343989b22 /Modules/FindSquish.cmake
parent317dbdb79761ef65e45c7358cfc7571c6afa54ad (diff)
downloadcmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.gz
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.bz2
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.zip
Imported Upstream version 3.9.4upstream/3.9.4
Diffstat (limited to 'Modules/FindSquish.cmake')
-rw-r--r--Modules/FindSquish.cmake170
1 files changed, 106 insertions, 64 deletions
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index b79780577..09bdf1ff9 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -1,81 +1,123 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#.rst:
+# FindSquish
+# ----------
+#
+# -- Typical Use
+#
+#
+#
+# This module can be used to find Squish. Currently Squish versions 3
+# and 4 are supported.
+#
+# ::
+#
+# SQUISH_FOUND If false, don't try to use Squish
+# SQUISH_VERSION The full version of Squish found
+# SQUISH_VERSION_MAJOR The major version of Squish found
+# SQUISH_VERSION_MINOR The minor version of Squish found
+# SQUISH_VERSION_PATCH The patch version of Squish found
+#
+#
+#
+# ::
#
-# ---- Find Squish
-# This module can be used to find Squish. Currently Squish versions 3 and 4 are supported.
+# SQUISH_INSTALL_DIR The Squish installation directory
+# (containing bin, lib, etc)
+# SQUISH_SERVER_EXECUTABLE The squishserver executable
+# SQUISH_CLIENT_EXECUTABLE The squishrunner executable
#
-# ---- Variables and Macros
-# SQUISH_FOUND If false, don't try to use Squish
-# SQUISH_VERSION The full version of Squish found
-# SQUISH_VERSION_MAJOR The major version of Squish found
-# SQUISH_VERSION_MINOR The minor version of Squish found
-# SQUISH_VERSION_PATCH The patch version of Squish found
#
-# SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc)
-# SQUISH_SERVER_EXECUTABLE The squishserver executable
-# SQUISH_CLIENT_EXECUTABLE The squishrunner executable
#
-# SQUISH_INSTALL_DIR_FOUND Was the install directory found?
-# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
-# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
+# ::
+#
+# SQUISH_INSTALL_DIR_FOUND Was the install directory found?
+# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
+# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
+#
+#
+#
+# It provides the function squish_v4_add_test() for adding a squish test
+# to cmake using Squish 4.x:
+#
+# ::
+#
+# squish_v4_add_test(cmakeTestName
+# AUT targetName SUITE suiteName TEST squishTestName
+# [SETTINGSGROUP group] [PRE_COMMAND command] [POST_COMMAND command] )
#
-# It provides the function squish_v4_add_test() for adding a squish test to cmake using Squish 4.x:
#
-# squish_v4_add_test(cmakeTestName AUT targetName SUITE suiteName TEST squishTestName
-# [SETTINGSGROUP group] [PRE_COMMAND command] [POST_COMMAND command] )
#
# The arguments have the following meaning:
-# cmakeTestName: this will be used as the first argument for add_test()
-# AUT targetName: the name of the cmake target which will be used as AUT, i.e. the
-# executable which will be tested.
-# SUITE suiteName: this is either the full path to the squish suite, or just the
-# last directory of the suite, i.e. the suite name. In this case
-# the CMakeLists.txt which calls squish_add_test() must be located
-# in the parent directory of the suite directory.
-# TEST squishTestName: the name of the squish test, i.e. the name of the subdirectory
-# of the test inside the suite directory.
-# SETTINGSGROUP group: if specified, the given settings group will be used for executing the test.
-# If not specified, the groupname will be "CTest_<username>"
-# PRE_COMMAND command: if specified, the given command will be executed before starting the squish test.
-# POST_COMMAND command: same as PRE_COMMAND, but after the squish test has been executed.
-#
-# ---- Typical Use
+#
+# ``cmakeTestName``
+# this will be used as the first argument for add_test()
+# ``AUT targetName``
+# the name of the cmake target which will be used as AUT, i.e. the
+# executable which will be tested.
+# ``SUITE suiteName``
+# this is either the full path to the squish suite, or just the
+# last directory of the suite, i.e. the suite name. In this case
+# the CMakeLists.txt which calls squish_add_test() must be located
+# in the parent directory of the suite directory.
+# ``TEST squishTestName``
+# the name of the squish test, i.e. the name of the subdirectory
+# of the test inside the suite directory.
+# ``SETTINGSGROUP group``
+# if specified, the given settings group will be used for executing the test.
+# If not specified, the groupname will be "CTest_<username>"
+# ``PRE_COMMAND command``
+# if specified, the given command will be executed before starting the squish test.
+# ``POST_COMMAND command``
+# same as PRE_COMMAND, but after the squish test has been executed.
+#
+#
+#
+# ::
+#
+# enable_testing()
+# find_package(Squish 4.0)
+# if (SQUISH_FOUND)
+# squish_v4_add_test(myTestName
+# AUT myApp
+# SUITE ${CMAKE_SOURCE_DIR}/tests/mySuite
+# TEST someSquishTest
+# SETTINGSGROUP myGroup
+# )
+# endif ()
+#
+#
+#
+#
+#
+# For users of Squish version 3.x the macro squish_v3_add_test() is
+# provided:
+#
+# ::
+#
+# squish_v3_add_test(testName applicationUnderTest testCase envVars testWrapper)
+# Use this macro to add a test using Squish 3.x.
+#
+#
+#
+# ::
+#
# enable_testing()
-# find_package(Squish 4.0)
+# find_package(Squish)
# if (SQUISH_FOUND)
-# squish_v4_add_test(myTestName AUT myApp SUITE ${CMAKE_SOURCE_DIR}/tests/mySuite TEST someSquishTest SETTINGSGROUP myGroup )
+# squish_v3_add_test(myTestName myApplication testCase envVars testWrapper)
# endif ()
#
#
-# For users of Squish version 3.x the macro squish_v3_add_test() is provided:
-# squish_v3_add_test(testName applicationUnderTest testCase envVars testWrapper)
-# Use this macro to add a test using Squish 3.x.
#
-# ---- Typical Use
-# enable_testing()
-# find_package(Squish)
-# if (SQUISH_FOUND)
-# squish_v3_add_test(myTestName myApplication testCase envVars testWrapper)
-# endif ()
+# macro SQUISH_ADD_TEST(testName applicationUnderTest testCase envVars
+# testWrapper)
#
-# macro SQUISH_ADD_TEST(testName applicationUnderTest testCase envVars testWrapper)
-# This is deprecated. Use SQUISH_V3_ADD_TEST() if you are using Squish 3.x instead.
-
-
-#=============================================================================
-# Copyright 2008-2009 Kitware, Inc.
-# Copyright 2012 Alexander Neundorf
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# ::
#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-
-include(CMakeParseArguments)
+# This is deprecated. Use SQUISH_V3_ADD_TEST() if you are using Squish 3.x instead.
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.")
@@ -139,7 +181,7 @@ if(SQUISH_CLIENT_EXECUTABLE)
execute_process(COMMAND "${SQUISH_CLIENT_EXECUTABLE}" --version
OUTPUT_VARIABLE _squishVersionOutput
ERROR_QUIET )
- if("${_squishVersionOutput}" MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+).*$")
+ if("${_squishVersionOutput}" MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(SQUISH_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(SQUISH_VERSION_MINOR "${CMAKE_MATCH_2}")
set(SQUISH_VERSION_PATCH "${CMAKE_MATCH_3}")
@@ -156,7 +198,7 @@ else()
endif()
# record if Squish was found
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(Squish REQUIRED_VARS SQUISH_INSTALL_DIR SQUISH_CLIENT_EXECUTABLE SQUISH_SERVER_EXECUTABLE
VERSION_VAR SQUISH_VERSION )