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
7434651728
|
10 years ago | |
---|---|---|
.. | ||
CMP0004 | 11 years ago | |
CMP0019 | 11 years ago | |
CMP0022 | 11 years ago | |
CMP0026 | 11 years ago | |
CMP0027 | 11 years ago | |
CMP0028 | 11 years ago | |
CMP0037 | 11 years ago | |
CMP0038 | 11 years ago | |
CMP0039 | 11 years ago | |
CMP0040 | 11 years ago | |
CMP0041 | 11 years ago | |
CMP0042 | 11 years ago | |
CMP0043 | 11 years ago | |
CMP0045 | 11 years ago | |
CMP0046 | 11 years ago | |
CMP0049 | 11 years ago | |
CMP0050 | 11 years ago | |
CTest | 11 years ago | |
CheckModules | 11 years ago | |
CommandLine | 11 years ago | |
CompatibleInterface | 11 years ago | |
CompilerChange | 11 years ago | |
CompilerNotFound | 11 years ago | |
Configure | 11 years ago | |
DisallowedCommands | 11 years ago | |
ExportWithoutLanguage | 11 years ago | |
ExternalData | 11 years ago | |
FPHSA | 11 years ago | |
File_Generate | 11 years ago | |
GeneratorExpression | 11 years ago | |
GeneratorToolset | 11 years ago | |
IncompatibleQt | 11 years ago | |
Languages | 11 years ago | |
ObjectLibrary | 11 years ago | |
ObsoleteQtMacros | 11 years ago | |
PositionIndependentCode | 11 years ago | |
SolutionGlobalSections | 11 years ago | |
Syntax | 10 years ago | |
TargetPolicies | 11 years ago | |
TargetPropertyGeneratorExpressions | 11 years ago | |
VisibilityPreset | 11 years ago | |
add_dependencies | 11 years ago | |
alias_targets | 11 years ago | |
build_command | 11 years ago | |
cmake_minimum_required | 11 years ago | |
export | 11 years ago | |
find_package | 11 years ago | |
get_filename_component | 11 years ago | |
if | 11 years ago | |
include | 11 years ago | |
include_directories | 11 years ago | |
include_external_msproject | 11 years ago | |
install | 11 years ago | |
interface_library | 11 years ago | |
list | 11 years ago | |
message | 11 years ago | |
no_install_prefix | 11 years ago | |
project | 11 years ago | |
set | 11 years ago | |
string | 11 years ago | |
target_link_libraries | 11 years ago | |
try_compile | 11 years ago | |
variable_watch | 11 years ago | |
CMakeLists.txt | 11 years ago | |
README.rst | 11 years ago | |
RunCMake.cmake | 11 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.
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
``-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``.