mirror of
https://github.com/reactos/CMake.git
synced 2024-12-03 00:57:25 +00:00
a55df20499
Fixes: #19789 |
||
---|---|---|
.. | ||
add_custom_command | ||
add_custom_target | ||
add_dependencies | ||
add_executable | ||
add_library | ||
add_link_options | ||
add_subdirectory | ||
alias_targets | ||
Android | ||
AndroidMK | ||
AndroidTestUtilities | ||
AutoExportDll | ||
Autogen | ||
build_command | ||
BuildDepends | ||
BundleUtilities | ||
Byproducts | ||
CacheNewline | ||
CheckIPOSupported | ||
CheckModules | ||
ClangTidy | ||
cmake_minimum_required | ||
cmake_parse_arguments | ||
CMakeRoleGlobalProperty | ||
CMP0004 | ||
CMP0019 | ||
CMP0022 | ||
CMP0026 | ||
CMP0027 | ||
CMP0028 | ||
CMP0037 | ||
CMP0038 | ||
CMP0039 | ||
CMP0040 | ||
CMP0041 | ||
CMP0042 | ||
CMP0043 | ||
CMP0045 | ||
CMP0046 | ||
CMP0049 | ||
CMP0050 | ||
CMP0051 | ||
CMP0053 | ||
CMP0054 | ||
CMP0055 | ||
CMP0057 | ||
CMP0059 | ||
CMP0060 | ||
CMP0064 | ||
CMP0065 | ||
CMP0068 | ||
CMP0069 | ||
CMP0081 | ||
CommandLine | ||
CommandLineTar | ||
CompatibleInterface | ||
CompileDefinitions | ||
CompileFeatures | ||
CompilerChange | ||
CompilerLauncher | ||
CompilerNotFound | ||
Configure | ||
configure_file | ||
continue | ||
CPack | ||
CPackCommandLine | ||
CPackConfig | ||
CPackInstallProperties | ||
CPackSymlinks | ||
Cppcheck | ||
Cpplint | ||
CrosscompilingEmulator | ||
CSharpCustomCommand | ||
CSharpReferenceImport | ||
CTest | ||
ctest_build | ||
ctest_cmake_error | ||
ctest_configure | ||
ctest_coverage | ||
ctest_disabled_test | ||
ctest_fixtures | ||
ctest_labels_for_subprojects | ||
ctest_memcheck | ||
ctest_skipped_test | ||
ctest_start | ||
ctest_submit | ||
ctest_test | ||
ctest_update | ||
ctest_upload | ||
CTestCommandExpandLists | ||
CTestCommandLine | ||
CTestResourceAllocation | ||
CTestTimeout | ||
CTestTimeoutAfterMatch | ||
DisallowedCommands | ||
execute_process | ||
export | ||
ExportWithoutLanguage | ||
ExternalData | ||
ExternalProject | ||
FeatureSummary | ||
FetchContent | ||
file | ||
File_Generate | ||
FileAPI | ||
FileAPIExternalSource | ||
find_dependency | ||
find_file | ||
find_library | ||
find_package | ||
find_path | ||
find_program | ||
FindBoost | ||
FindGTK2 | ||
FindLua | ||
FindMatlab | ||
FindOpenGL | ||
FindPkgConfig | ||
foreach | ||
FPHSA | ||
Framework | ||
function | ||
GenerateExportHeader | ||
GeneratorExpression | ||
GeneratorInstance | ||
GeneratorPlatform | ||
GeneratorToolset | ||
get_filename_component | ||
get_property | ||
GetPrerequisites | ||
GNUInstallDirs | ||
GoogleTest | ||
Graphviz | ||
if | ||
IfacePaths | ||
include | ||
include_directories | ||
include_external_msproject | ||
include_guard | ||
IncludeWhatYouUse | ||
IncompatibleQt | ||
install | ||
INSTALL_NAME_DIR | ||
interface_library | ||
Languages | ||
LinkStatic | ||
LinkWhatYouUse | ||
list | ||
load_cache | ||
Make | ||
math | ||
MaxRecursionDepth | ||
message | ||
MetaCompileFeatures | ||
MSVCRuntimeLibrary | ||
MSVCWarningFlags | ||
MultiLint | ||
Ninja | ||
NinjaMultiConfig | ||
no_install_prefix | ||
ObjectLibrary | ||
ObsoleteQtMacros | ||
option | ||
ParseImplicitData | ||
ParseImplicitIncludeInfo | ||
ParseImplicitLinkInfo | ||
PolicyScope | ||
PositionIndependentCode | ||
PrecompileHeaders | ||
project | ||
project_injected | ||
return | ||
RuntimePath | ||
ScriptMode | ||
separate_arguments | ||
set | ||
set_property | ||
SourceProperties | ||
string | ||
Swift | ||
Syntax | ||
target_compile_definitions | ||
target_compile_features | ||
target_compile_options | ||
target_include_directories | ||
target_link_directories | ||
target_link_libraries | ||
target_link_options | ||
target_sources | ||
TargetObjects | ||
TargetPolicies | ||
TargetProperties | ||
TargetPropertyGeneratorExpressions | ||
TargetSources | ||
test_include_dirs | ||
ToolchainFile | ||
try_compile | ||
try_run | ||
UnityBuild | ||
UseSWIG | ||
variable_watch | ||
VisibilityPreset | ||
VS10Project | ||
VS10ProjectWinCE | ||
VSSolution | ||
while | ||
WorkingDirectory | ||
WriteBasicConfigVersionFile | ||
WriteCompilerDetectionHeader | ||
XcodeProject | ||
CMakeLists.txt | ||
color_warning.c | ||
exit_code.c | ||
FileAPIDummyFile.cmake | ||
print_stdin.c | ||
pseudo_cppcheck.c | ||
pseudo_cpplint.c | ||
pseudo_emulator_custom_command_arg.c | ||
pseudo_emulator_custom_command.c | ||
pseudo_emulator.c | ||
pseudo_iwyu.c | ||
pseudo_tidy.c | ||
README.rst | ||
RunCMake.cmake | ||
RunCTest.cmake |
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 ``<Test>/``. 2. In ``./CMakeLists.txt`` call ``add_RunCMake_test`` and pass the test directory name ``<Test>``. 3. Create script ``<Test>/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 ``<Test>/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 ``<Test>/<SubTest>.cmake`` file for each sub-test named above containing the actual test code. Optionally create files containing expected test results: ``<SubTest>-result.txt`` Regex matching expected process result, if not ``0`` ``<SubTest>-stdout.txt`` Regex matching expected stdout content ``<SubTest>-stderr.txt`` Regex matching expected stderr content, if not ``^$`` ``<SubTest>-check.cmake`` Custom result check. Note that when a specific platform expects differing stdout or stderr that can be done by adding a platform specific output file. These follow the naming convention of: ``<SubTest>-stdout-<platform_lower_case>.txt`` ``<SubTest>-stderr-<platform_lower_case>.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 ``<SubTest>-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``. 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 subtests in ``RunCMake.Example`` that start with ``example``.