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
4a69966b60
|
9 years ago | |
---|---|---|
.. | ||
AutoExportDll | 9 years ago | |
BuildDepends | 9 years ago | |
CMP0004 | 11 years ago | |
CMP0019 | 9 years ago | |
CMP0022 | 9 years ago | |
CMP0026 | 9 years ago | |
CMP0027 | 11 years ago | |
CMP0028 | 9 years ago | |
CMP0037 | 9 years ago | |
CMP0038 | 9 years ago | |
CMP0039 | 9 years ago | |
CMP0040 | 9 years ago | |
CMP0041 | 9 years ago | |
CMP0042 | 9 years ago | |
CMP0043 | 9 years ago | |
CMP0045 | 9 years ago | |
CMP0046 | 9 years ago | |
CMP0049 | 9 years ago | |
CMP0050 | 9 years ago | |
CMP0051 | 10 years ago | |
CMP0053 | 10 years ago | |
CMP0054 | 9 years ago | |
CMP0055 | 9 years ago | |
CMP0057 | 9 years ago | |
CMP0059 | 9 years ago | |
CMP0060 | 9 years ago | |
CMP0064 | 9 years ago | |
CMP0065 | 9 years ago | |
COMPILE_LANGUAGE-genex | 9 years ago | |
CPack | 9 years ago | |
CPackConfig | 9 years ago | |
CPackInstallProperties | 10 years ago | |
CPackSymlinks | 9 years ago | |
CTest | 9 years ago | |
CTestCommandLine | 9 years ago | |
CheckModules | 10 years ago | |
CommandLine | 9 years ago | |
CommandLineTar | 9 years ago | |
CompatibleInterface | 11 years ago | |
CompileDefinitions | 9 years ago | |
CompileFeatures | 9 years ago | |
CompilerChange | 11 years ago | |
CompilerLauncher | 9 years ago | |
CompilerNotFound | 9 years ago | |
Configure | 10 years ago | |
CrosscompilingEmulator | 9 years ago | |
DisallowedCommands | 9 years ago | |
ExportWithoutLanguage | 11 years ago | |
ExternalData | 9 years ago | |
ExternalProject | 9 years ago | |
FPHSA | 10 years ago | |
FeatureSummary | 9 years ago | |
File_Generate | 9 years ago | |
FindMatlab | 9 years ago | |
FindPkgConfig | 9 years ago | |
Framework | 9 years ago | |
GNUInstallDirs | 9 years ago | |
GeneratorExpression | 9 years ago | |
GeneratorPlatform | 10 years ago | |
GeneratorToolset | 10 years ago | |
IfacePaths | 9 years ago | |
IncludeWhatYouUse | 9 years ago | |
IncompatibleQt | 11 years ago | |
Languages | 9 years ago | |
LinkStatic | 9 years ago | |
Make | 9 years ago | |
Ninja | 9 years ago | |
ObjectLibrary | 10 years ago | |
ObsoleteQtMacros | 11 years ago | |
PolicyScope | 9 years ago | |
PositionIndependentCode | 11 years ago | |
SolutionGlobalSections | 11 years ago | |
Swift | 9 years ago | |
Syntax | 9 years ago | |
TargetObjects | 10 years ago | |
TargetPolicies | 9 years ago | |
TargetPropertyGeneratorExpressions | 9 years ago | |
TargetSources | 9 years ago | |
VisibilityPreset | 9 years ago | |
WriteCompilerDetectionHeader | 10 years ago | |
XcodeProject | 9 years ago | |
add_custom_command | 9 years ago | |
add_custom_target | 10 years ago | |
add_dependencies | 11 years ago | |
add_subdirectory | 9 years ago | |
alias_targets | 11 years ago | |
build_command | 9 years ago | |
cmake_minimum_required | 11 years ago | |
cmake_parse_arguments | 9 years ago | |
configure_file | 10 years ago | |
continue | 10 years ago | |
ctest_build | 9 years ago | |
ctest_configure | 9 years ago | |
ctest_coverage | 9 years ago | |
ctest_memcheck | 9 years ago | |
ctest_start | 9 years ago | |
ctest_submit | 9 years ago | |
ctest_test | 9 years ago | |
ctest_upload | 9 years ago | |
execute_process | 9 years ago | |
export | 9 years ago | |
file | 9 years ago | |
find_dependency | 10 years ago | |
find_file | 9 years ago | |
find_library | 9 years ago | |
find_package | 9 years ago | |
find_path | 9 years ago | |
find_program | 9 years ago | |
get_filename_component | 9 years ago | |
get_property | 9 years ago | |
if | 9 years ago | |
include | 11 years ago | |
include_directories | 9 years ago | |
include_external_msproject | 10 years ago | |
install | 9 years ago | |
interface_library | 9 years ago | |
list | 9 years ago | |
message | 9 years ago | |
no_install_prefix | 9 years ago | |
project | 9 years ago | |
return | 10 years ago | |
set | 10 years ago | |
set_property | 9 years ago | |
string | 9 years ago | |
target_compile_features | 10 years ago | |
target_link_libraries | 9 years ago | |
try_compile | 10 years ago | |
try_run | 10 years ago | |
variable_watch | 11 years ago | |
while | 9 years ago | |
CMakeLists.txt | 9 years ago | |
README.rst | 9 years ago | |
RunCMake.cmake | 9 years ago | |
RunCTest.cmake | 9 years ago | |
pseudo_emulator.c | 9 years ago | |
pseudo_iwyu.c | 9 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``
Process result expected 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``.