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.
Mario Lang
75c6a19f8d
|
10 years ago | |
---|---|---|
.. | ||
CMP0004 | 11 years ago | |
CMP0019 | 10 years ago | |
CMP0022 | 11 years ago | |
CMP0026 | 10 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 | |
CMP0051 | 10 years ago | |
CMP0053 | 10 years ago | |
CMP0054 | 10 years ago | |
CMP0055 | 10 years ago | |
CPackInstallProperties | 10 years ago | |
CPackRPM | 10 years ago | |
CTest | 11 years ago | |
CTestMemcheck | 10 years ago | |
CTestSubmit | 10 years ago | |
CheckModules | 10 years ago | |
CommandLine | 10 years ago | |
CompatibleInterface | 11 years ago | |
CompileFeatures | 10 years ago | |
CompilerChange | 11 years ago | |
CompilerNotFound | 11 years ago | |
Configure | 10 years ago | |
DisallowedCommands | 11 years ago | |
ExportWithoutLanguage | 11 years ago | |
ExternalData | 10 years ago | |
ExternalProject | 10 years ago | |
FPHSA | 10 years ago | |
FeatureSummary | 10 years ago | |
File_Generate | 10 years ago | |
FindPkgConfig | 10 years ago | |
GeneratorExpression | 10 years ago | |
GeneratorPlatform | 10 years ago | |
GeneratorToolset | 10 years ago | |
IncompatibleQt | 11 years ago | |
Languages | 10 years ago | |
ObjectLibrary | 10 years ago | |
ObsoleteQtMacros | 11 years ago | |
PositionIndependentCode | 11 years ago | |
SolutionGlobalSections | 11 years ago | |
Syntax | 10 years ago | |
TargetObjects | 10 years ago | |
TargetPolicies | 10 years ago | |
TargetPropertyGeneratorExpressions | 10 years ago | |
TargetSources | 10 years ago | |
VisibilityPreset | 11 years ago | |
WriteCompilerDetectionHeader | 10 years ago | |
XcodeProject | 10 years ago | |
add_custom_command | 10 years ago | |
add_custom_target | 10 years ago | |
add_dependencies | 11 years ago | |
alias_targets | 11 years ago | |
build_command | 11 years ago | |
cmake_minimum_required | 11 years ago | |
configure_file | 10 years ago | |
continue | 10 years ago | |
export | 11 years ago | |
file | 10 years ago | |
find_dependency | 10 years ago | |
find_library | 10 years ago | |
find_package | 11 years ago | |
get_filename_component | 11 years ago | |
get_property | 10 years ago | |
if | 11 years ago | |
include | 11 years ago | |
include_directories | 10 years ago | |
include_external_msproject | 10 years ago | |
install | 10 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 | |
return | 10 years ago | |
set | 10 years ago | |
string | 10 years ago | |
target_compile_features | 10 years ago | |
target_link_libraries | 11 years ago | |
try_compile | 10 years ago | |
try_run | 10 years ago | |
variable_watch | 11 years ago | |
CMakeLists.txt | 10 years ago | |
README.rst | 10 years ago | |
RunCMake.cmake | 10 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, 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``.