summaryrefslogtreecommitdiffstats
path: root/Modules/FindGTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindGTest.cmake')
-rw-r--r--Modules/FindGTest.cmake110
1 files changed, 74 insertions, 36 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index d531dd1..2c74540 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -1,58 +1,96 @@
+#.rst:
+# FindGTest
+# ---------
+#
+# --------------------
+#
# Locate the Google C++ Testing Framework.
#
# Defines the following variables:
#
-# GTEST_FOUND - Found the Google Testing framework
-# GTEST_INCLUDE_DIRS - Include directories
+# ::
+#
+# GTEST_FOUND - Found the Google Testing framework
+# GTEST_INCLUDE_DIRS - Include directories
+#
+#
+#
+# Also defines the library variables below as normal variables. These
+# contain debug/optimized keywords when a debugging library is found.
+#
+# ::
+#
+# GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
+# GTEST_LIBRARIES - libgtest
+# GTEST_MAIN_LIBRARIES - libgtest-main
#
-# Also defines the library variables below as normal
-# variables. These contain debug/optimized keywords when
-# a debugging library is found.
#
-# GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
-# GTEST_LIBRARIES - libgtest
-# GTEST_MAIN_LIBRARIES - libgtest-main
#
# Accepts the following variables as input:
#
-# GTEST_ROOT - (as a CMake or environment variable)
-# The root directory of the gtest install prefix
+# ::
+#
+# GTEST_ROOT - (as a CMake or environment variable)
+# The root directory of the gtest install prefix
+#
+#
+#
+# ::
+#
+# GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
+# "MD" or "MT" to enable searching a GTest build tree
+# (defaults: "MD")
+#
#
-# GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
-# "MD" or "MT" to enable searching a GTest build tree
-# (defaults: "MD")
#
-#-----------------------
# Example Usage:
#
-# enable_testing()
-# find_package(GTest REQUIRED)
-# include_directories(${GTEST_INCLUDE_DIRS})
+# ::
+#
+# enable_testing()
+# find_package(GTest REQUIRED)
+# include_directories(${GTEST_INCLUDE_DIRS})
#
-# add_executable(foo foo.cc)
-# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
#
-# add_test(AllTestsInFoo foo)
#
-#-----------------------
+# ::
#
-# If you would like each Google test to show up in CTest as
-# a test you may use the following macro.
-# NOTE: It will slow down your tests by running an executable
-# for each test and test fixture. You will also have to rerun
-# CMake after adding or removing tests or test fixtures.
+# add_executable(foo foo.cc)
+# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
+#
+#
+#
+# ::
+#
+# add_test(AllTestsInFoo foo)
+#
+#
+#
+#
+#
+# If you would like each Google test to show up in CTest as a test you
+# may use the following macro. NOTE: It will slow down your tests by
+# running an executable for each test and test fixture. You will also
+# have to rerun CMake after adding or removing tests or test fixtures.
#
# GTEST_ADD_TESTS(executable extra_args ARGN)
-# executable = The path to the test executable
-# extra_args = Pass a list of extra arguments to be passed to
-# executable enclosed in quotes (or "" for none)
-# ARGN = A list of source files to search for tests & test
-# fixtures.
-#
-# Example:
-# set(FooTestArgs --foo 1 --bar 2)
-# add_executable(FooTest FooUnitTest.cc)
-# GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
+#
+# ::
+#
+# executable = The path to the test executable
+# extra_args = Pass a list of extra arguments to be passed to
+# executable enclosed in quotes (or "" for none)
+# ARGN = A list of source files to search for tests & test
+# fixtures.
+#
+#
+#
+# ::
+#
+# Example:
+# set(FooTestArgs --foo 1 --bar 2)
+# add_executable(FooTest FooUnitTest.cc)
+# GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
#=============================================================================
# Copyright 2009 Kitware, Inc.