diff options
author | Kitware Robot <kwrobot@kitware.com> | 2013-10-15 15:17:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-15 18:12:03 (GMT) |
commit | f051814ed0e63badbfd68049354f36259dbf4b49 (patch) | |
tree | f4e6f885f86c882d723a7dd53d2b702d0c7fdffb /Modules/FindGTest.cmake | |
parent | e94958e99c4dec26c86ce8b76d744c04ba960675 (diff) | |
download | CMake-f051814ed0e63badbfd68049354f36259dbf4b49.zip CMake-f051814ed0e63badbfd68049354f36259dbf4b49.tar.gz CMake-f051814ed0e63badbfd68049354f36259dbf4b49.tar.bz2 |
Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
Diffstat (limited to 'Modules/FindGTest.cmake')
-rw-r--r-- | Modules/FindGTest.cmake | 110 |
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. |