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

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``.