8053 beefd0184a 2022-08-08 ct_chen 2 years ago
..
Android beefd0184a 2022-08-08 ct_chen 2 years ago
AndroidMK beefd0184a 2022-08-08 ct_chen 2 years ago
AndroidTestUtilities beefd0184a 2022-08-08 ct_chen 2 years ago
AutoExportDll beefd0184a 2022-08-08 ct_chen 2 years ago
BuildDepends beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0004 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0019 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0022 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0026 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0027 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0028 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0037 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0038 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0039 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0040 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0041 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0042 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0043 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0045 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0046 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0049 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0050 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0051 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0053 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0054 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0055 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0057 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0059 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0060 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0064 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0065 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0068 beefd0184a 2022-08-08 ct_chen 2 years ago
CMP0069 beefd0184a 2022-08-08 ct_chen 2 years ago
CMakeFiles beefd0184a 2022-08-08 ct_chen 2 years ago
CPack beefd0184a 2022-08-08 ct_chen 2 years ago
CPackConfig beefd0184a 2022-08-08 ct_chen 2 years ago
CPackInstallProperties beefd0184a 2022-08-08 ct_chen 2 years ago
CPackSymlinks beefd0184a 2022-08-08 ct_chen 2 years ago
CSharpCustomCommand beefd0184a 2022-08-08 ct_chen 2 years ago
CTest beefd0184a 2022-08-08 ct_chen 2 years ago
CTestCommandLine beefd0184a 2022-08-08 ct_chen 2 years ago
CTestTimeoutAfterMatch beefd0184a 2022-08-08 ct_chen 2 years ago
CacheNewline beefd0184a 2022-08-08 ct_chen 2 years ago
CheckIPOSupported beefd0184a 2022-08-08 ct_chen 2 years ago
CheckModules beefd0184a 2022-08-08 ct_chen 2 years ago
ClangTidy beefd0184a 2022-08-08 ct_chen 2 years ago
CommandLine beefd0184a 2022-08-08 ct_chen 2 years ago
CommandLineTar beefd0184a 2022-08-08 ct_chen 2 years ago
CompatibleInterface beefd0184a 2022-08-08 ct_chen 2 years ago
CompileDefinitions beefd0184a 2022-08-08 ct_chen 2 years ago
CompileFeatures beefd0184a 2022-08-08 ct_chen 2 years ago
CompilerChange beefd0184a 2022-08-08 ct_chen 2 years ago
CompilerLauncher beefd0184a 2022-08-08 ct_chen 2 years ago
CompilerNotFound beefd0184a 2022-08-08 ct_chen 2 years ago
Configure beefd0184a 2022-08-08 ct_chen 2 years ago
Cppcheck beefd0184a 2022-08-08 ct_chen 2 years ago
Cpplint beefd0184a 2022-08-08 ct_chen 2 years ago
CrosscompilingEmulator beefd0184a 2022-08-08 ct_chen 2 years ago
DisallowedCommands beefd0184a 2022-08-08 ct_chen 2 years ago
ExportWithoutLanguage beefd0184a 2022-08-08 ct_chen 2 years ago
ExternalData beefd0184a 2022-08-08 ct_chen 2 years ago
ExternalProject beefd0184a 2022-08-08 ct_chen 2 years ago
FPHSA beefd0184a 2022-08-08 ct_chen 2 years ago
FeatureSummary beefd0184a 2022-08-08 ct_chen 2 years ago
FetchContent beefd0184a 2022-08-08 ct_chen 2 years ago
File_Generate beefd0184a 2022-08-08 ct_chen 2 years ago
FindBoost beefd0184a 2022-08-08 ct_chen 2 years ago
FindGTK2 beefd0184a 2022-08-08 ct_chen 2 years ago
FindMatlab beefd0184a 2022-08-08 ct_chen 2 years ago
FindOpenGL beefd0184a 2022-08-08 ct_chen 2 years ago
FindPkgConfig beefd0184a 2022-08-08 ct_chen 2 years ago
Framework beefd0184a 2022-08-08 ct_chen 2 years ago
GNUInstallDirs beefd0184a 2022-08-08 ct_chen 2 years ago
GenerateExportHeader beefd0184a 2022-08-08 ct_chen 2 years ago
GeneratorExpression beefd0184a 2022-08-08 ct_chen 2 years ago
GeneratorInstance beefd0184a 2022-08-08 ct_chen 2 years ago
GeneratorPlatform beefd0184a 2022-08-08 ct_chen 2 years ago
GeneratorToolset beefd0184a 2022-08-08 ct_chen 2 years ago
GetPrerequisites beefd0184a 2022-08-08 ct_chen 2 years ago
GoogleTest beefd0184a 2022-08-08 ct_chen 2 years ago
IfacePaths beefd0184a 2022-08-08 ct_chen 2 years ago
IncludeWhatYouUse beefd0184a 2022-08-08 ct_chen 2 years ago
IncompatibleQt beefd0184a 2022-08-08 ct_chen 2 years ago
Languages beefd0184a 2022-08-08 ct_chen 2 years ago
LinkStatic beefd0184a 2022-08-08 ct_chen 2 years ago
LinkWhatYouUse beefd0184a 2022-08-08 ct_chen 2 years ago
Make beefd0184a 2022-08-08 ct_chen 2 years ago
MultiLint beefd0184a 2022-08-08 ct_chen 2 years ago
Ninja beefd0184a 2022-08-08 ct_chen 2 years ago
ObjectLibrary beefd0184a 2022-08-08 ct_chen 2 years ago
ObsoleteQtMacros beefd0184a 2022-08-08 ct_chen 2 years ago
PolicyScope beefd0184a 2022-08-08 ct_chen 2 years ago
PositionIndependentCode beefd0184a 2022-08-08 ct_chen 2 years ago
RuntimePath beefd0184a 2022-08-08 ct_chen 2 years ago
SourceProperties beefd0184a 2022-08-08 ct_chen 2 years ago
Swift beefd0184a 2022-08-08 ct_chen 2 years ago
Syntax beefd0184a 2022-08-08 ct_chen 2 years ago
TargetObjects beefd0184a 2022-08-08 ct_chen 2 years ago
TargetPolicies beefd0184a 2022-08-08 ct_chen 2 years ago
TargetPropertyGeneratorExpressions beefd0184a 2022-08-08 ct_chen 2 years ago
TargetSources beefd0184a 2022-08-08 ct_chen 2 years ago
ToolchainFile beefd0184a 2022-08-08 ct_chen 2 years ago
VS10Project beefd0184a 2022-08-08 ct_chen 2 years ago
VSSolution beefd0184a 2022-08-08 ct_chen 2 years ago
VisibilityPreset beefd0184a 2022-08-08 ct_chen 2 years ago
WriteCompilerDetectionHeader beefd0184a 2022-08-08 ct_chen 2 years ago
XcodeProject beefd0184a 2022-08-08 ct_chen 2 years ago
add_custom_command beefd0184a 2022-08-08 ct_chen 2 years ago
add_custom_target beefd0184a 2022-08-08 ct_chen 2 years ago
add_dependencies beefd0184a 2022-08-08 ct_chen 2 years ago
add_executable beefd0184a 2022-08-08 ct_chen 2 years ago
add_library beefd0184a 2022-08-08 ct_chen 2 years ago
add_subdirectory beefd0184a 2022-08-08 ct_chen 2 years ago
alias_targets beefd0184a 2022-08-08 ct_chen 2 years ago
build_command beefd0184a 2022-08-08 ct_chen 2 years ago
cmake_minimum_required beefd0184a 2022-08-08 ct_chen 2 years ago
cmake_parse_arguments beefd0184a 2022-08-08 ct_chen 2 years ago
configure_file beefd0184a 2022-08-08 ct_chen 2 years ago
continue beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_build beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_cmake_error beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_configure beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_coverage beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_disabled_test beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_fixtures beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_labels_for_subprojects beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_memcheck beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_skipped_test beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_start beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_submit beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_test beefd0184a 2022-08-08 ct_chen 2 years ago
ctest_upload beefd0184a 2022-08-08 ct_chen 2 years ago
execute_process beefd0184a 2022-08-08 ct_chen 2 years ago
export beefd0184a 2022-08-08 ct_chen 2 years ago
file beefd0184a 2022-08-08 ct_chen 2 years ago
find_dependency beefd0184a 2022-08-08 ct_chen 2 years ago
find_file beefd0184a 2022-08-08 ct_chen 2 years ago
find_library beefd0184a 2022-08-08 ct_chen 2 years ago
find_package beefd0184a 2022-08-08 ct_chen 2 years ago
find_path beefd0184a 2022-08-08 ct_chen 2 years ago
find_program beefd0184a 2022-08-08 ct_chen 2 years ago
foreach beefd0184a 2022-08-08 ct_chen 2 years ago
get_filename_component beefd0184a 2022-08-08 ct_chen 2 years ago
get_property beefd0184a 2022-08-08 ct_chen 2 years ago
if beefd0184a 2022-08-08 ct_chen 2 years ago
include beefd0184a 2022-08-08 ct_chen 2 years ago
include_directories beefd0184a 2022-08-08 ct_chen 2 years ago
include_external_msproject beefd0184a 2022-08-08 ct_chen 2 years ago
include_guard beefd0184a 2022-08-08 ct_chen 2 years ago
install beefd0184a 2022-08-08 ct_chen 2 years ago
interface_library beefd0184a 2022-08-08 ct_chen 2 years ago
list beefd0184a 2022-08-08 ct_chen 2 years ago
message beefd0184a 2022-08-08 ct_chen 2 years ago
no_install_prefix beefd0184a 2022-08-08 ct_chen 2 years ago
project beefd0184a 2022-08-08 ct_chen 2 years ago
return beefd0184a 2022-08-08 ct_chen 2 years ago
separate_arguments beefd0184a 2022-08-08 ct_chen 2 years ago
set beefd0184a 2022-08-08 ct_chen 2 years ago
set_property beefd0184a 2022-08-08 ct_chen 2 years ago
string beefd0184a 2022-08-08 ct_chen 2 years ago
target_compile_features beefd0184a 2022-08-08 ct_chen 2 years ago
target_link_libraries beefd0184a 2022-08-08 ct_chen 2 years ago
test_include_dirs beefd0184a 2022-08-08 ct_chen 2 years ago
try_compile beefd0184a 2022-08-08 ct_chen 2 years ago
try_run beefd0184a 2022-08-08 ct_chen 2 years ago
variable_watch beefd0184a 2022-08-08 ct_chen 2 years ago
while beefd0184a 2022-08-08 ct_chen 2 years ago
CMakeLists.txt beefd0184a 2022-08-08 ct_chen 2 years ago
CTestTestfile.cmake beefd0184a 2022-08-08 ct_chen 2 years ago
Makefile beefd0184a 2022-08-08 ct_chen 2 years ago
README.rst beefd0184a 2022-08-08 ct_chen 2 years ago
RunCMake.cmake beefd0184a 2022-08-08 ct_chen 2 years ago
RunCTest.cmake beefd0184a 2022-08-08 ct_chen 2 years ago
cmake_install.cmake beefd0184a 2022-08-08 ct_chen 2 years ago
exit_code beefd0184a 2022-08-08 ct_chen 2 years ago
exit_code.c beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_cppcheck beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_cppcheck.c beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_cpplint beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_cpplint.c beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_emulator beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_emulator.c beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_emulator_custom_command beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_emulator_custom_command.c beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_iwyu beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_iwyu.c beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_tidy beefd0184a 2022-08-08 ct_chen 2 years ago
pseudo_tidy.c beefd0184a 2022-08-08 ct_chen 2 years ago

README.rst

This directory contains tests that run CMake to configure a project
but do not actually build anything. 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(SubTest1)
...
run_cmake(SubTestN)

where ``SubTest1`` through ``SubTestN`` are sub-test names each
corresponding to an independent CMake run and project configuration.

One may also add calls of the form::

run_cmake_command(SubTestI ${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(SubTest1)
...
run_ctest(SubTestN)

and create ``test.cmake.in``, ``CTestConfig.cmake.in``, and
``CMakeLists.txt.in`` files to be configured for each case.

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
sub-test.

5. Create a ``/.cmake`` file for each sub-test 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.

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 variables

``RunCMake_TEST_SOURCE_DIR``
Top of test source tree
``RunCMake_TEST_BINARY_DIR``
Top of test binary tree

and an failure must store a message in ``RunCMake_TEST_FAILED``.