You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Timo Röhling
8813f25f55
|
1 month ago | |
---|---|---|
.. | ||
ABI | 3 years ago | |
Android | 2 months ago | |
AndroidMK | 2 months ago | |
AndroidTestUtilities | 2 months ago | |
AppleSilicon | 2 years ago | |
AppleTextStubs | 2 months ago | |
AutoExportDll | 2 months ago | |
Autogen_1 | 2 months ago | |
Autogen_2 | 2 months ago | |
Autogen_3 | 2 months ago | |
Autogen_4 | 2 months ago | |
Autogen_5 | 2 months ago | |
Autogen_6 | 1 month ago | |
Autogen_common | 2 months ago | |
BuildDepends | 2 months ago | |
BuiltinTargets | 9 months ago | |
BundleUtilities | 2 years ago | |
Byproducts | 2 years ago | |
CMAKE_MSVCIDE_RUN_PATH | 3 years ago | |
CMP0004 | 2 months ago | |
CMP0019 | 2 years ago | |
CMP0022 | 2 years ago | |
CMP0026 | 2 years ago | |
CMP0027 | 3 years ago | |
CMP0037 | 7 months ago | |
CMP0038 | 2 years ago | |
CMP0039 | 2 years ago | |
CMP0040 | 2 years ago | |
CMP0041 | 2 years ago | |
CMP0042 | 2 years ago | |
CMP0043 | 2 years ago | |
CMP0045 | 2 years ago | |
CMP0046 | 2 years ago | |
CMP0049 | 2 years ago | |
CMP0050 | 2 years ago | |
CMP0051 | 2 years ago | |
CMP0053 | 2 years ago | |
CMP0054 | 2 years ago | |
CMP0055 | 2 years ago | |
CMP0057 | 2 years ago | |
CMP0059 | 9 years ago | |
CMP0060 | 1 year ago | |
CMP0064 | 2 years ago | |
CMP0065 | 2 years ago | |
CMP0068 | 2 months ago | |
CMP0069 | 2 months ago | |
CMP0081 | 2 years ago | |
CMP0102 | 2 years ago | |
CMP0104 | 2 years ago | |
CMP0106 | 2 years ago | |
CMP0111 | 1 year ago | |
CMP0115 | 1 year ago | |
CMP0116 | 1 year ago | |
CMP0118 | 6 months ago | |
CMP0119 | 1 year ago | |
CMP0121 | 2 years ago | |
CMP0125 | 3 years ago | |
CMP0126 | 9 months ago | |
CMP0129 | 2 months ago | |
CMP0132 | 2 years ago | |
CMP0135 | 6 months ago | |
CMP0139 | 2 years ago | |
CMP0150 | 2 years ago | |
CMP0152 | 1 year ago | |
CMP0153 | 1 year ago | |
CMP0156 | 2 months ago | |
CMP0160 | 9 months ago | |
CMP0163 | 6 months ago | |
CMP0165 | 6 months ago | |
CMP0169 | 6 months ago | |
CMP0170 | 6 months ago | |
CMP0171 | 2 months ago | |
CMP0173 | 2 months ago | |
CMakeDependentOption | 6 months ago | |
CMakePackage | 6 months ago | |
CMakePresets | 2 months ago | |
CMakePresetsBuild | 2 years ago | |
CMakePresetsPackage | 2 years ago | |
CMakePresetsTest | 2 years ago | |
CMakePresetsWorkflow | 2 months ago | |
CMakeRelease | 2 years ago | |
CMakeRoleGlobalProperty | 5 years ago | |
CPack | 2 months ago | |
CPackCommandLine | 5 years ago | |
CPackConfig | 2 months ago | |
CPackInstallProperties | 2 months ago | |
CPackSymlinks | 2 years ago | |
CPack_NuGet | 6 months ago | |
CPack_WIX | 6 months ago | |
CSharpCustomCommand | 2 months ago | |
CSharpReferenceImport | 2 months ago | |
CTest | 2 months ago | |
CTestCommandExpandLists | 2 years ago | |
CTestCommandLine | 2 months ago | |
CTestResourceAllocation | 6 months ago | |
CTestTimeout | 1 year ago | |
CTestTimeoutAfterMatch | 2 months ago | |
CUDA_architectures | 1 year ago | |
CXXModules | 2 months ago | |
CacheNewline | 2 months ago | |
CheckCompilerFlag | 9 months ago | |
CheckIPOSupported | 2 months ago | |
CheckLinkerFlag | 2 years ago | |
CheckModules | 2 months ago | |
CheckSourceCompiles | 9 months ago | |
CheckSourceRuns | 9 months ago | |
ClangTidy | 2 months ago | |
Codegen | 2 months ago | |
Color | 2 years ago | |
CommandLine | 2 months ago | |
CommandLineTar | 2 months ago | |
CompatibleInterface | 2 months ago | |
CompileDefinitions | 2 months ago | |
CompileFeatures | 2 months ago | |
CompileWarningAsError | 9 months ago | |
CompilerArgs | 2 months ago | |
CompilerChange | 2 months ago | |
CompilerId | 2 months ago | |
CompilerLauncher | 2 months ago | |
CompilerNotFound | 2 months ago | |
CompilerTest | 2 years ago | |
ConfigDir | 2 months ago | |
Configure | 2 months ago | |
Cppcheck | 2 months ago | |
Cpplint | 2 months ago | |
CrosscompilingEmulator | 2 months ago | |
DependencyGraph | 2 months ago | |
DependencyProviders | 9 months ago | |
DisallowedCommands | 2 months ago | |
ExcludeFromAll | 2 months ago | |
ExportCompileCommands | 3 years ago | |
ExportImport | 2 years ago | |
ExportWithoutLanguage | 2 months ago | |
ExternalData | 2 months ago | |
ExternalProject | 6 months ago | |
ExtraGenerators | 2 months ago | |
FPHSA | 2 months ago | |
FeatureSummary | 2 months ago | |
FetchContent | 2 months ago | |
FetchContent_find_package | 6 months ago | |
FileAPI | 6 months ago | |
FileAPIExternalSource | 3 years ago | |
File_Archive | 2 months ago | |
File_Configure | 2 years ago | |
File_Generate | 2 months ago | |
FindBoost | 2 months ago | |
FindGTK2 | 2 months ago | |
FindLua | 2 months ago | |
FindMatlab | 2 months ago | |
FindOpenGL | 9 months ago | |
FindOpenSSL | 2 years ago | |
FindPkgConfig | 2 months ago | |
FindSWIG | 2 years ago | |
Framework | 2 months ago | |
GNUInstallDirs | 2 months ago | |
GenEx-COMPILE_LANGUAGE | 2 months ago | |
GenEx-COMPILE_LANG_AND_ID | 3 years ago | |
GenEx-DEVICE_LINK | 3 years ago | |
GenEx-GENEX_EVAL | 4 years ago | |
GenEx-HOST_LINK | 3 years ago | |
GenEx-LINK_GROUP | 2 years ago | |
GenEx-LINK_LANGUAGE | 3 years ago | |
GenEx-LINK_LANG_AND_ID | 3 years ago | |
GenEx-LINK_LIBRARY | 6 months ago | |
GenEx-LIST | 1 year ago | |
GenEx-PATH | 2 years ago | |
GenEx-PATH_EQUAL | 2 years ago | |
GenEx-TARGET_FILE | 1 month ago | |
GenEx-TARGET_IMPORT_FILE | 2 months ago | |
GenEx-TARGET_PROPERTY | 2 months ago | |
GenEx-TARGET_RUNTIME_DLLS | 2 years ago | |
GenerateExportHeader | 2 months ago | |
GeneratorExpression | 2 months ago | |
GeneratorExpressionShortCircuit | 1 year ago | |
GeneratorInstance | 2 months ago | |
GeneratorPlatform | 2 months ago | |
GeneratorToolset | 2 months ago | |
GetPrerequisites | 2 years ago | |
GoogleTest | 2 months ago | |
Graphviz | 9 months ago | |
IAR | 2 months ago | |
INSTALL_NAME_DIR | 4 years ago | |
IfacePaths | 2 months ago | |
IncludeWhatYouUse | 2 months ago | |
IncompatibleQt | 2 months ago | |
InitialFlags | 3 years ago | |
InstallParallel | 2 months ago | |
InterfaceLibrary | 2 months ago | |
LanguageStandards | 6 months ago | |
Languages | 2 months ago | |
LinkItemValidation | 2 months ago | |
LinkLibrariesProcessing | 6 months ago | |
LinkLibrariesStrategy | 2 months ago | |
LinkStatic | 2 months ago | |
LinkWhatYouUse | 2 months ago | |
LinkerLauncher | 2 years ago | |
LinkerSelection | 6 months ago | |
MSVCDebugInformationFormat | 2 years ago | |
MSVCRuntimeLibrary | 3 years ago | |
MSVCRuntimeTypeInfo | 1 year ago | |
MSVCWarningFlags | 3 years ago | |
MacOSVersions | 2 years ago | |
Make | 2 months ago | |
MaxRecursionDepth | 2 years ago | |
MetaCompileFeatures | 5 years ago | |
MultiLint | 2 months ago | |
Ninja | 2 months ago | |
NinjaMultiConfig | 2 months ago | |
NinjaPrivateDeps | 1 year ago | |
ObjectLibrary | 9 months ago | |
ObsoleteQtMacros | 2 months ago | |
PackageInfo | 2 months ago | |
ParseImplicitData | 2 months ago | |
ParseImplicitIncludeInfo | 2 months ago | |
ParseImplicitLinkInfo | 2 months ago | |
Policy | 3 years ago | |
PolicyScope | 2 years ago | |
PositionIndependentCode | 2 months ago | |
PrecompileHeaders | 9 months ago | |
PrintHelpers | 9 months ago | |
RunCPack | 2 months ago | |
RuntimePath | 1 month ago | |
ScriptMode | 6 years ago | |
SourceProperties | 2 months ago | |
StandardLinkDirectories | 2 months ago | |
Swift | 5 months ago | |
SymlinkTrees | 2 months ago | |
Syntax | 2 years ago | |
TIClang | 9 months ago | |
TargetArtifacts | 2 years ago | |
TargetObjects | 2 months ago | |
TargetPolicies | 2 months ago | |
TargetProperties | 2 months ago | |
ToolchainFile | 2 months ago | |
TransformDepfile | 9 months ago | |
UnityBuild | 2 months ago | |
UseSWIG | 9 months ago | |
VS10Project | 2 months ago | |
VS10ProjectUseDebugLibraries | 6 months ago | |
VSSolution | 2 months ago | |
VerifyHeaderSets | 6 months ago | |
VisibilityPreset | 2 months ago | |
VsDotnetSdk | 2 months ago | |
VsNugetPackageRestore | 3 years ago | |
Win32GenEx | 3 years ago | |
WorkingDirectory | 5 years ago | |
WriteBasicConfigVersionFile | 3 years ago | |
WriteCompilerDetectionHeader | 2 months ago | |
XcFramework | 2 months ago | |
XcodeProject | 2 months ago | |
XcodeProject-Device | 2 months ago | |
XcodeProject-Embed | 9 months ago | |
add_compile_definitions | 9 months ago | |
add_custom_command | 2 months ago | |
add_custom_target | 2 months ago | |
add_dependencies | 2 months ago | |
add_executable | 2 months ago | |
add_library | 2 months ago | |
add_link_options | 2 years ago | |
add_subdirectory | 2 months ago | |
add_test | 9 months ago | |
alias_targets | 2 months ago | |
block | 2 years ago | |
build_command | 2 months ago | |
cmake_host_system_information | 6 months ago | |
cmake_language | 2 months ago | |
cmake_minimum_required | 2 months ago | |
cmake_parse_arguments | 2 months ago | |
cmake_path | 2 months ago | |
cmake_pkg_config | 2 months ago | |
configure_file | 2 months ago | |
continue | 2 months ago | |
ctest_build | 2 months ago | |
ctest_cmake_error | 2 months ago | |
ctest_configure | 2 months ago | |
ctest_coverage | 2 months ago | |
ctest_disabled_test | 2 months ago | |
ctest_empty_binary_directory | 2 months ago | |
ctest_environment | 2 months ago | |
ctest_fixtures | 2 months ago | |
ctest_labels_for_subprojects | 2 months ago | |
ctest_memcheck | 2 months ago | |
ctest_skipped_test | 2 months ago | |
ctest_start | 2 months ago | |
ctest_submit | 2 months ago | |
ctest_test | 2 months ago | |
ctest_update | 2 months ago | |
ctest_upload | 2 months ago | |
define_property | 9 months ago | |
execute_process | 2 months ago | |
export | 2 months ago | |
file | 2 months ago | |
file-CHMOD | 2 months ago | |
file-DOWNLOAD | 2 months ago | |
file-GET_RUNTIME_DEPENDENCIES | 2 months ago | |
file-MAKE_DIRECTORY | 2 months ago | |
file-RPATH | 2 months ago | |
file-STRINGS | 9 months ago | |
find_dependency | 2 months ago | |
find_file | 2 months ago | |
find_library | 2 months ago | |
find_package | 2 months ago | |
find_path | 2 months ago | |
find_program | 2 months ago | |
foreach | 9 months ago | |
function | 4 years ago | |
get_filename_component | 2 months ago | |
get_property | 2 months ago | |
if | 2 months ago | |
include | 2 months ago | |
include_directories | 2 months ago | |
include_external_msproject | 2 months ago | |
include_guard | 2 months ago | |
install | 2 months ago | |
list | 2 months ago | |
load_cache | 4 years ago | |
math | 2 months ago | |
message | 2 months ago | |
no_install_prefix | 2 months ago | |
option | 3 years ago | |
project | 2 months ago | |
project_injected | 2 months ago | |
property_init | 2 months ago | |
return | 2 years ago | |
separate_arguments | 2 months ago | |
set | 2 months ago | |
set_property | 2 months ago | |
set_tests_properties | 1 year ago | |
string | 2 months ago | |
target_compile_definitions | 9 months ago | |
target_compile_features | 2 months ago | |
target_compile_options | 9 months ago | |
target_include_directories | 3 years ago | |
target_link_directories | 4 years ago | |
target_link_libraries | 2 months ago | |
target_link_libraries-ALIAS | 2 months ago | |
target_link_libraries-LINK_GROUP | 9 months ago | |
target_link_libraries-LINK_LANGUAGE | 2 months ago | |
target_link_libraries-LINK_LANG_AND_ID | 2 months ago | |
target_link_libraries-LINK_LIBRARY | 6 months ago | |
target_link_options | 1 month ago | |
target_sources | 9 months ago | |
test_include_dirs | 2 months ago | |
try_compile | 2 months ago | |
try_run | 2 months ago | |
variable_watch | 2 months ago | |
while | 2 months ago | |
AddRunCMakeTest.cmake | 2 years ago | |
CMakeLists.txt | 2 months ago | |
FileAPIDummyFile.cmake | 5 years ago | |
README.rst | 2 months ago | |
RunCMake.cmake | 2 months ago | |
RunCPack.cmake | 6 months ago | |
RunCTest.cmake | 9 months ago | |
color_warning.c | 5 years ago | |
detect_jobserver.c | 2 months ago | |
exit_code.c | 4 years ago | |
exit_crash.c | 6 months ago | |
fake_build_command.c | 3 years ago | |
print_stdin.c | 9 months ago | |
pseudo_cppcheck.c | 4 years ago | |
pseudo_cpplint.c | 8 years ago | |
pseudo_emulator.c | 9 months ago | |
pseudo_emulator_custom_command.c | 8 years ago | |
pseudo_emulator_custom_command_arg.c | 5 years ago | |
pseudo_iwyu.c | 8 years ago | |
pseudo_llvm-rc.c | 2 months ago | |
pseudo_tidy.c | 2 years ago | |
showIncludes.c | 9 months ago | |
testStartupInfo.c | 7 months ago |
README.rst
CMake Tests/RunCMake Directory
******************************
This directory contains tests that run CMake and/or other tools while
precisely checking their return code and stdout/stderr content.
The RunCMake infrastructure is useful for testing error cases and
diagnostic output.
See also `../README.rst`_, the `CMake Testing Guide`_,
and the `CMake Source Code Guide`_.
.. _`../README.rst`: ../README.rst
.. _`CMake Testing Guide`: ../../Help/dev/testing.rst
.. _`CMake Source Code Guide`: ../../Help/dev/source.rst
.. _`CMakeLists.txt`: CMakeLists.txt
Adding a Test
=============
To add a test:
1. Add a subdirectory named for the test, say ``/``.
2. In `CMakeLists.txt`_ call ``add_RunCMake_test`` and pass the
test directory name ````.
3. Create script ``/RunCMakeTest.cmake`` in the directory containing::
include(RunCMake)
run_cmake(Case1)
...
run_cmake(CaseN)
where ``Case1`` through ``CaseN`` are case names each corresponding to
an independent CMake run and project configuration.
One may also add calls of the form::
run_cmake_command(CaseI ${CMAKE_COMMAND} ...)
to fully customize the test case command-line.
Alternatively, if the test is to cover running ``ctest -S`` then use::
include(RunCTest)
run_ctest(Case1)
...
run_ctest(CaseN)
and create ``test.cmake.in``, ``CTestConfig.cmake.in``, and
``CMakeLists.txt.in`` files to be configured for each case.
Alternatively, if the test is to cover running ``cpack -G`` then use::
include(RunCPack)
run_cpack(Sample1)
...
run_cpack(SampleN)
where ``Sample1`` through ``SampleN`` are sample project directories
in the ``RunCPack/`` directory adjacent to this file.
4. Create file ``/CMakeLists.txt`` in the directory containing::
cmake_minimum_required(...)
project(${RunCMake_TEST} NONE) # or languages needed
include(${RunCMake_TEST}.cmake)
where ``${RunCMake_TEST}`` is literal. A value for ``RunCMake_TEST``
will be passed to CMake by the ``run_cmake`` macro when running each
case.
5. Create a ``/.cmake`` file for each case named
above containing the actual test code. Optionally create files
containing expected test results:
``-result.txt``
Regex matching expected process result, if not ``0``
``-stdout.txt``
Regex matching expected stdout content
``-stderr.txt``
Regex matching expected stderr content, if not ``^$``
``-check.cmake``
Custom result check.
To specify platform-specific matches, create files of the form
``-{stdout,stderr}-.txt``.
Note that trailing newlines will be stripped from actual and expected
test output before matching against the stdout and stderr expressions.
The code in ``-check.cmake`` may use the `RunCMake Variables`_.
On failure the script must store a message in ``RunCMake_TEST_FAILED``.
The check script may optionally set ``RunCMake_TEST_FAILURE_MESSAGE``
with additional text to be included in the message if the test fails.
RunCMake Commands
=================
A ``RunCMakeTest.cmake`` script, after ``include(RunCMake)``, may use
the following commands.
``run_cmake()``
Run CMake or another command and check expected results described by
``-{result,stdout,stderr}.txt`` and ``-check.cmake``.
The command is executed by a call of the form::
execute_process(
COMMAND ${RunCMake_TEST_COMMAND} ${RunCMake_TEST_OPTIONS}
WORKING_DIRECTORY "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}"
[TIMEOUT "${RunCMake_TEST_TIMEOUT}"]
...
)
Behavior may be customized by setting `RunCMake Variables`_ before
the call.
``run_cmake_command( ...)``
Sets ``RunCMake_TEST_COMMAND`` to ``;...``
and calls ``run_cmake()``.
This is useful to run an arbitrary command.
``run_cmake_script( ...)``
Sets ``RunCMake_TEST_COMMAND`` to
``${CMAKE_COMMAND};...;-P;${RunCMake_SOURCE_DIR}/.cmake``
and calls ``run_cmake()``.
This is useful to run CMake in script mode without configuring a project.
``run_cmake_with_options( ...)``
Sets ``RunCMake_TEST_OPTIONS`` to ``...``
and calls ``run_cmake()``.
``run_cmake_with_raw_args( "")``
Calls ``run_cmake()`` with the underlying ``execute_process()``
call extended with the content of ```` treated as literal source
code of CMake language command arguments::
execute_process(
COMMAND ${RunCMake_TEST_COMMAND} ${RunCMake_TEST_OPTIONS}
...
)
This is useful to pass arguments to the test command that cannot be
encoded in CMake language ``;``-separated lists.
RunCMake Variables
==================
The behavior of `RunCMake Commands`_ such as ``run_cmake()`` may be
customized by setting the following variables before a call.
``RunCMake_GENERATOR``
CMake generator to use when configuring projects.
This provided to ``RunCMakeTest.cmake`` scripts automatically
when they are executed, based on the CMake generator used to
configure the test suite.
For some generators, additional variables are also provided:
``RunCMake_GENERATOR_PLATFORM``
Specifies the ``CMAKE_GENERATOR_PLATFORM``.
``RunCMake_GENERATOR_TOOLSET``
Specifies the ``CMAKE_GENERATOR_TOOLSET``.
``RunCMake_GENERATOR_INSTANCE``
Specifies the ``CMAKE_GENERATOR_INSTANCE``.
``RunCMake_GENERATOR_IS_MULTI_CONFIG``
Boolean value indicating whether ``${RunCMake_GENERATOR}`` is a
multi-config generator.
This provided to ``RunCMakeTest.cmake`` scripts automatically
when they are executed, based on the CMake generator used to
configure the test suite.
``RunCMake_SOURCE_DIR``
Absolute path to the ``Tests/RunCMake/`` directory in
the CMake source tree. This provided to ``RunCMakeTest.cmake``
scripts automatically when they are executed.
``RunCMake_BINARY_DIR``
Absolute path to the ``Tests/RunCMake/`` directory in
the CMake binary tree. This provided to ``RunCMakeTest.cmake``
scripts automatically when they are executed.
``RunCMake_TEST_SOURCE_DIR``
Absolute path to the individual test case's source tree.
If not set, defaults to ``${RunCMake_SOURCE_DIR}``.
``RunCMake_TEST_BINARY_DIR``
Absolute path to the individual test case's binary tree.
If not set, defaults to ``${RunCMake_BINARY_DIR}/-build``.
``RunCMake_TEST_NO_CLEAN``
Boolean value indicating whether ``run_cmake()`` should remove the
``${RunCMake_TEST_BINARY_DIR}`` directory before running the test case.
If not set, or if set to a false value, the directory is removed.
This is useful to run `Multi-Step Test Cases`_.
``RunCMake_TEST_COMMAND``
The command for ``run_cmake()`` to execute.
If not set, defaults to running CMake to generate a project::
${CMAKE_COMMAND} ${RunCMake_TEST_SOURCE_DIR} \
-G ${RunCMake_GENERATOR} ... -DRunCMake_TEST=
``RunCMake_TEST_COMMAND_WORKING_DIRECTORY``
The working directory in which ``run_cmake()`` to execute its command.
If not set, defaults to ``${RunCMake_TEST_BINARY_DIR}``.
``RunCMake_TEST_OPTIONS``
Additional command-line options for ``run_cmake()`` to pass to
CMake when configuring a project with a default ``RunCMake_TEST_COMMAND``.
If not set, defaults to empty.
If ``RunCMake_TEST_COMMAND`` is set, ``RunCMake_TEST_OPTIONS`` is forced
to empty.
``RunCMake_TEST_OUTPUT_MERGE``
Boolean value indicating whether ``run_cmake()`` should redirect
the test process's ``stderr`` into its ``stdout``.
``RunCMake_TEST_TIMEOUT``
Specify a timeout, in seconds, for ``run_cmake()`` to pass to its
underlying ``execute_process()`` call using the ``TIMEOUT`` option.
Multi-Step Test Cases
=====================
Normally each ``run_cmake()`` call corresponds to one standalone
test case with its own build tree. However, some test cases may require
multiple steps to be performed in a single build tree. This can be
achieved as follows::
block()
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/example-build)
run_cmake(example)
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_command(example-build ${CMAKE_COMMAND} --build . --config Debug)
endblock()
In this example, ``block() ... endblock()`` is used to isolate the
variable settings from later cases. A single build tree is used for
all cases inside the block. The first step cleans the build tree and
runs CMake to configure the case's project. The second step runs
``cmake --build`` to drive the generated build system and merges the
build tool's ``stderr`` into its ``stdout``. Note that each call uses
a unique case name so that expected results can be expressed individually.
Running a Test
==============
Each call to ``add_RunCMake_test(Example)`` in `CMakeLists.txt`_ creates
a test named ``RunCMake.Example`` that may be run with ``ctest``::
$ ctest -R "^RunCMake\.Example$"
To speed up local testing, you can choose to run only a subset of
``run_cmake()`` tests in a ``RunCMakeTest.cmake`` script by using the
``RunCMake_TEST_FILTER`` environment variable. If this variable is set,
it is treated as a regular expression, and any tests whose names don't
match the regular expression are not run. For example::
$ RunCMake_TEST_FILTER="^example" ctest -R '^RunCMake\.Example$'
This will only run cases in ``RunCMake.Example`` that start with
``example``.
To speed up the process of creating a new ``RunCMake`` test, you can run a
script that will automatically perform steps 1 through 4 for you::
cmake -DRunCMake_TEST_SUITE= -P Tests/RunCMake/AddRunCMakeTestSuite.cmake
Be sure to run this from the top-level CMake source directory.