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.
Felix Geyer
80652e0087
|
5 years ago | |
---|---|---|
.. | ||
Android | 6 years ago | |
AndroidMK | 6 years ago | |
AndroidTestUtilities | 8 years ago | |
AutoExportDll | 6 years ago | |
Autogen | 5 years ago | |
BuildDepends | 5 years ago | |
BundleUtilities | 5 years ago | |
Byproducts | 6 years ago | |
CMP0004 | 11 years ago | |
CMP0019 | 8 years ago | |
CMP0022 | 8 years ago | |
CMP0026 | 5 years ago | |
CMP0027 | 11 years ago | |
CMP0028 | 8 years ago | |
CMP0037 | 7 years ago | |
CMP0038 | 7 years ago | |
CMP0039 | 7 years ago | |
CMP0040 | 7 years ago | |
CMP0041 | 7 years ago | |
CMP0042 | 7 years ago | |
CMP0043 | 7 years ago | |
CMP0045 | 7 years ago | |
CMP0046 | 7 years ago | |
CMP0049 | 7 years ago | |
CMP0050 | 7 years ago | |
CMP0051 | 5 years ago | |
CMP0053 | 7 years ago | |
CMP0054 | 7 years ago | |
CMP0055 | 6 years ago | |
CMP0057 | 9 years ago | |
CMP0059 | 9 years ago | |
CMP0060 | 6 years ago | |
CMP0064 | 5 years ago | |
CMP0065 | 8 years ago | |
CMP0068 | 8 years ago | |
CMP0069 | 5 years ago | |
CMP0081 | 6 years ago | |
CMakeRoleGlobalProperty | 5 years ago | |
CPack | 5 years ago | |
CPackCommandLine | 5 years ago | |
CPackConfig | 6 years ago | |
CPackInstallProperties | 7 years ago | |
CPackSymlinks | 9 years ago | |
CSharpCustomCommand | 6 years ago | |
CSharpReferenceImport | 6 years ago | |
CTest | 7 years ago | |
CTestCommandLine | 5 years ago | |
CTestTimeoutAfterMatch | 5 years ago | |
CacheNewline | 7 years ago | |
CheckIPOSupported | 6 years ago | |
CheckModules | 6 years ago | |
ClangTidy | 8 years ago | |
CommandLine | 5 years ago | |
CommandLineTar | 5 years ago | |
CompatibleInterface | 9 years ago | |
CompileDefinitions | 9 years ago | |
CompileFeatures | 8 years ago | |
CompilerChange | 11 years ago | |
CompilerLauncher | 7 years ago | |
CompilerNotFound | 9 years ago | |
Configure | 8 years ago | |
Cppcheck | 5 years ago | |
Cpplint | 7 years ago | |
CrosscompilingEmulator | 5 years ago | |
DisallowedCommands | 8 years ago | |
ExportWithoutLanguage | 9 years ago | |
ExternalData | 5 years ago | |
ExternalProject | 5 years ago | |
FPHSA | 7 years ago | |
FeatureSummary | 8 years ago | |
FetchContent | 5 years ago | |
FileAPI | 5 years ago | |
FileAPIExternalSource | 5 years ago | |
File_Generate | 5 years ago | |
FindBoost | 5 years ago | |
FindGTK2 | 8 years ago | |
FindLua | 6 years ago | |
FindMatlab | 6 years ago | |
FindOpenGL | 7 years ago | |
FindPkgConfig | 5 years ago | |
Framework | 5 years ago | |
GNUInstallDirs | 5 years ago | |
GenerateExportHeader | 6 years ago | |
GeneratorExpression | 5 years ago | |
GeneratorInstance | 7 years ago | |
GeneratorPlatform | 5 years ago | |
GeneratorToolset | 5 years ago | |
GetPrerequisites | 5 years ago | |
GoogleTest | 6 years ago | |
IfacePaths | 7 years ago | |
IncludeWhatYouUse | 9 years ago | |
IncompatibleQt | 9 years ago | |
Languages | 6 years ago | |
LinkStatic | 6 years ago | |
LinkWhatYouUse | 8 years ago | |
MSVCRuntimeLibrary | 5 years ago | |
MSVCWarningFlags | 5 years ago | |
Make | 5 years ago | |
MaxRecursionDepth | 5 years ago | |
MetaCompileFeatures | 5 years ago | |
MultiLint | 7 years ago | |
Ninja | 5 years ago | |
ObjectLibrary | 5 years ago | |
ObsoleteQtMacros | 9 years ago | |
ParseImplicitIncludeInfo | 5 years ago | |
PolicyScope | 5 years ago | |
PositionIndependentCode | 5 years ago | |
RuntimePath | 5 years ago | |
ScriptMode | 6 years ago | |
SourceProperties | 7 years ago | |
Swift | 5 years ago | |
Syntax | 5 years ago | |
TargetObjects | 5 years ago | |
TargetPolicies | 5 years ago | |
TargetPropertyGeneratorExpressions | 5 years ago | |
TargetSources | 5 years ago | |
ToolchainFile | 5 years ago | |
UseSWIG | 5 years ago | |
VS10Project | 5 years ago | |
VS10ProjectWinCE | 5 years ago | |
VSSolution | 8 years ago | |
VisibilityPreset | 5 years ago | |
WorkingDirectory | 5 years ago | |
WriteBasicConfigVersionFile | 5 years ago | |
WriteCompilerDetectionHeader | 6 years ago | |
XcodeProject | 5 years ago | |
add_custom_command | 6 years ago | |
add_custom_target | 7 years ago | |
add_dependencies | 8 years ago | |
add_executable | 5 years ago | |
add_library | 5 years ago | |
add_link_options | 6 years ago | |
add_subdirectory | 5 years ago | |
alias_targets | 7 years ago | |
build_command | 6 years ago | |
cmake_minimum_required | 6 years ago | |
cmake_parse_arguments | 5 years ago | |
configure_file | 6 years ago | |
continue | 8 years ago | |
ctest_build | 5 years ago | |
ctest_cmake_error | 5 years ago | |
ctest_configure | 5 years ago | |
ctest_coverage | 5 years ago | |
ctest_disabled_test | 5 years ago | |
ctest_fixtures | 5 years ago | |
ctest_labels_for_subprojects | 5 years ago | |
ctest_memcheck | 5 years ago | |
ctest_skipped_test | 5 years ago | |
ctest_start | 5 years ago | |
ctest_submit | 5 years ago | |
ctest_test | 5 years ago | |
ctest_update | 5 years ago | |
ctest_upload | 5 years ago | |
execute_process | 5 years ago | |
export | 5 years ago | |
file | 5 years ago | |
find_dependency | 8 years ago | |
find_file | 9 years ago | |
find_library | 8 years ago | |
find_package | 5 years ago | |
find_path | 5 years ago | |
find_program | 6 years ago | |
foreach | 7 years ago | |
get_filename_component | 5 years ago | |
get_property | 5 years ago | |
if | 8 years ago | |
include | 9 years ago | |
include_directories | 9 years ago | |
include_external_msproject | 5 years ago | |
include_guard | 5 years ago | |
install | 5 years ago | |
interface_library | 5 years ago | |
list | 5 years ago | |
math | 6 years ago | |
message | 5 years ago | |
no_install_prefix | 9 years ago | |
option | 6 years ago | |
project | 6 years ago | |
project_injected | 5 years ago | |
return | 10 years ago | |
separate_arguments | 8 years ago | |
set | 5 years ago | |
set_property | 5 years ago | |
string | 5 years ago | |
target_compile_definitions | 5 years ago | |
target_compile_features | 5 years ago | |
target_compile_options | 5 years ago | |
target_include_directories | 5 years ago | |
target_link_directories | 5 years ago | |
target_link_libraries | 5 years ago | |
target_link_options | 5 years ago | |
target_sources | 5 years ago | |
test_include_dirs | 7 years ago | |
try_compile | 5 years ago | |
try_run | 5 years ago | |
variable_watch | 6 years ago | |
while | 8 years ago | |
CMakeLists.txt | 5 years ago | |
FileAPIDummyFile.cmake | 5 years ago | |
README.rst | 5 years ago | |
RunCMake.cmake | 5 years ago | |
RunCTest.cmake | 5 years ago | |
exit_code.c | 7 years ago | |
print_stdin.c | 6 years ago | |
pseudo_cppcheck.c | 5 years ago | |
pseudo_cpplint.c | 8 years ago | |
pseudo_emulator.c | 9 years 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_tidy.c | 8 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``.
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``.