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
a8309966fd
|
6 years ago | |
---|---|---|
.. | ||
Android | 6 years ago | |
AndroidMK | 6 years ago | |
AndroidTestUtilities | 8 years ago | |
AutoExportDll | 6 years ago | |
BuildDepends | 7 years ago | |
BundleUtilities | 6 years ago | |
Byproducts | 6 years ago | |
CMP0004 | 11 years ago | |
CMP0019 | 8 years ago | |
CMP0022 | 8 years ago | |
CMP0026 | 8 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 | 7 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 | 9 years ago | |
CMP0065 | 8 years ago | |
CMP0068 | 8 years ago | |
CMP0069 | 6 years ago | |
CMP0081 | 6 years ago | |
CPack | 6 years ago | |
CPackCommandLine | 7 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 | 6 years ago | |
CTestTimeoutAfterMatch | 9 years ago | |
CacheNewline | 7 years ago | |
CheckIPOSupported | 6 years ago | |
CheckModules | 6 years ago | |
ClangTidy | 8 years ago | |
CommandLine | 6 years ago | |
CommandLineTar | 9 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 | 7 years ago | |
Cpplint | 7 years ago | |
CrosscompilingEmulator | 8 years ago | |
DisallowedCommands | 8 years ago | |
ExportWithoutLanguage | 9 years ago | |
ExternalData | 9 years ago | |
ExternalProject | 6 years ago | |
FPHSA | 7 years ago | |
FeatureSummary | 8 years ago | |
FetchContent | 7 years ago | |
File_Generate | 7 years ago | |
FindBoost | 6 years ago | |
FindGTK2 | 8 years ago | |
FindLua | 6 years ago | |
FindMatlab | 6 years ago | |
FindOpenGL | 7 years ago | |
FindPkgConfig | 6 years ago | |
Framework | 7 years ago | |
GNUInstallDirs | 6 years ago | |
GenerateExportHeader | 6 years ago | |
GeneratorExpression | 6 years ago | |
GeneratorInstance | 7 years ago | |
GeneratorPlatform | 8 years ago | |
GeneratorToolset | 6 years ago | |
GetPrerequisites | 7 years ago | |
GoogleTest | 6 years ago | |
IfacePaths | 7 years ago | |
IncludeWhatYouUse | 9 years ago | |
IncompatibleQt | 9 years ago | |
Languages | 9 years ago | |
LinkStatic | 6 years ago | |
LinkWhatYouUse | 8 years ago | |
Make | 7 years ago | |
MultiLint | 7 years ago | |
Ninja | 6 years ago | |
ObjectLibrary | 6 years ago | |
ObsoleteQtMacros | 9 years ago | |
PolicyScope | 9 years ago | |
PositionIndependentCode | 9 years ago | |
RuntimePath | 7 years ago | |
ScriptMode | 6 years ago | |
SourceProperties | 7 years ago | |
Swift | 9 years ago | |
Syntax | 6 years ago | |
TargetObjects | 7 years ago | |
TargetPolicies | 6 years ago | |
TargetPropertyGeneratorExpressions | 7 years ago | |
TargetSources | 6 years ago | |
ToolchainFile | 8 years ago | |
UseSWIG | 6 years ago | |
VS10Project | 6 years ago | |
VSSolution | 8 years ago | |
VisibilityPreset | 6 years ago | |
WorkingDirectory | 6 years ago | |
WriteCompilerDetectionHeader | 6 years ago | |
XcodeProject | 6 years ago | |
add_custom_command | 6 years ago | |
add_custom_target | 7 years ago | |
add_dependencies | 8 years ago | |
add_executable | 7 years ago | |
add_library | 6 years ago | |
add_link_options | 6 years ago | |
add_subdirectory | 8 years ago | |
alias_targets | 7 years ago | |
build_command | 6 years ago | |
cmake_minimum_required | 6 years ago | |
cmake_parse_arguments | 8 years ago | |
configure_file | 6 years ago | |
continue | 8 years ago | |
ctest_build | 8 years ago | |
ctest_cmake_error | 8 years ago | |
ctest_configure | 9 years ago | |
ctest_coverage | 9 years ago | |
ctest_disabled_test | 8 years ago | |
ctest_fixtures | 7 years ago | |
ctest_labels_for_subprojects | 7 years ago | |
ctest_memcheck | 6 years ago | |
ctest_skipped_test | 7 years ago | |
ctest_start | 6 years ago | |
ctest_submit | 6 years ago | |
ctest_test | 6 years ago | |
ctest_upload | 9 years ago | |
execute_process | 7 years ago | |
export | 6 years ago | |
file | 6 years ago | |
find_dependency | 8 years ago | |
find_file | 9 years ago | |
find_library | 8 years ago | |
find_package | 6 years ago | |
find_path | 8 years ago | |
find_program | 6 years ago | |
foreach | 7 years ago | |
get_filename_component | 7 years ago | |
get_property | 6 years ago | |
if | 8 years ago | |
include | 9 years ago | |
include_directories | 9 years ago | |
include_external_msproject | 8 years ago | |
include_guard | 7 years ago | |
install | 6 years ago | |
interface_library | 7 years ago | |
list | 6 years ago | |
math | 6 years ago | |
message | 7 years ago | |
no_install_prefix | 9 years ago | |
option | 6 years ago | |
project | 6 years ago | |
project_injected | 6 years ago | |
return | 10 years ago | |
separate_arguments | 8 years ago | |
set | 10 years ago | |
set_property | 6 years ago | |
string | 6 years ago | |
target_compile_features | 7 years ago | |
target_link_libraries | 6 years ago | |
target_link_options | 6 years ago | |
test_include_dirs | 7 years ago | |
try_compile | 6 years ago | |
try_run | 9 years ago | |
variable_watch | 6 years ago | |
while | 8 years ago | |
CMakeLists.txt | 6 years ago | |
README.rst | 7 years ago | |
RunCMake.cmake | 6 years ago | |
RunCTest.cmake | 8 years ago | |
exit_code.c | 7 years ago | |
print_stdin.c | 6 years ago | |
pseudo_cppcheck.c | 6 years ago | |
pseudo_cpplint.c | 8 years ago | |
pseudo_emulator.c | 9 years ago | |
pseudo_emulator_custom_command.c | 8 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``.