Stephen Kelly 5de63265e3 Genex: Only evaluate TARGET_OBJECTS to determine target sources. 11 years ago
..
CMP0004 d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMP0019 d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMP0022 d25ad482e9 OS X: Add CMP0042 to enable MACOSX_RPATH by default 12 years ago
CMP0026 c903b5319b cmTarget: Restore <CONFIG>_LOCATION to CMP0026 OLD behavior (#14808) 11 years ago
CMP0027 b1bbee3e9a Record more policies on targets when created 11 years ago
CMP0028 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0037 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0038 b1bbee3e9a Record more policies on targets when created 11 years ago
CMP0039 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0040 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0041 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0042 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0043 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0045 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0046 d83245a34f cmTarget: Don't create duplicate backtraces in CMP0046 warning 11 years ago
CMP0049 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0050 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 11 years ago
CMP0051 5702e10677 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 11 years ago
CTest bca67c710f build_command: Return a "cmake --build" command-line 12 years ago
CheckModules 7f857775e2 CheckTypeSize: Add unit test to cover the no-C case 11 years ago
CommandLine 94389f6388 cmake: Add '-E sleep' command 11 years ago
CompatibleInterface 5771f81d91 cmTarget: Add GetTransitiveTargetClosure method. 11 years ago
CompilerChange 15610bb5b1 Drop use of configure_file IMMEDIATE option 12 years ago
CompilerNotFound 3e04946f7b Require CMAKE_<LANG>_COMPILER to be found as a full path 12 years ago
Configure 82d4317503 Allow projects to specify extra inputs to CMake 11 years ago
DisallowedCommands 4ea27bcc4c Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands test 12 years ago
ExportWithoutLanguage 66b290e7e2 export(): Process the export() command at generate time. 12 years ago
ExternalData 8eb20eeabe ExternalData: Allow local stores without any URL templates 12 years ago
FPHSA d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
FeatureSummary 8372b4553b FeatureSummary: Add unit tests 11 years ago
File_Generate d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
FindPkgConfig cc5a0d8f42 FindPkgConfig: More unit tests 11 years ago
GeneratorExpression 6aabb6a62b Genex: Use case-sensitive comparison for COMPILER_ID. 11 years ago
GeneratorToolset d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
IncompatibleQt d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
Languages d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
ObjectLibrary fdcefe3c42 cmGeneratorTarget: Compute consumed object libraries on demand. 11 years ago
ObsoleteQtMacros f69606d335 Qt4Macros: Port to use message(DEPRECATION) 12 years ago
PositionIndependentCode 2e60b5fcf7 cmTarget: Report origin of COMPATIBLE_INTERFACE properties. 12 years ago
SolutionGlobalSections d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
Syntax a9bdef2dda tests: Add variable expansion tests 11 years ago
TargetObjects 5de63265e3 Genex: Only evaluate TARGET_OBJECTS to determine target sources. 11 years ago
TargetPolicies b1bbee3e9a Record more policies on targets when created 11 years ago
TargetPropertyGeneratorExpressions d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
VisibilityPreset d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
add_dependencies d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
alias_targets d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
build_command 4ac75fdfe6 Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548) 12 years ago
cmake_minimum_required 7d47c69365 Drop compatibility with CMake < 2.4 12 years ago
configure_file 98383f802a Unicode: check encoding of files given to configure_file. 11 years ago
export cbe7e8fae4 export: Implement EXPORT subcommand (#9822) 12 years ago
find_dependency a25b809f20 Tests: Check find_dependency empty extra arguments 11 years ago
find_package d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
get_filename_component d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
if d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
include 84fac67f90 Don't allow include() of export(EXPORT) file at configure time. 11 years ago
include_directories 9eedc850eb Export: Process relative includes after genex evaluation. 12 years ago
include_external_msproject d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
install be0458c562 InstallRules: added new variable to disable generation of install rules 11 years ago
interface_library 2600e923a6 Disallow INTERFACE libraries with add_custom_command(TARGET). 11 years ago
list d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
message 509c142a3f message: Add a DEPRECATION mode 12 years ago
no_install_prefix fe057ab3cd Allow disabling adding the install prefix to the prefix search path. 12 years ago
project 7e142c5ac2 project: Manage VERSION variables 11 years ago
set bf755c7c38 set: Add unit tests for set/unset PARENT_SCOPE 12 years ago
string 4e184a21be string: Add CONCAT sub-command 12 years ago
target_link_libraries d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
try_compile d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
variable_watch d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMakeLists.txt 5702e10677 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 11 years ago
README.rst d4ca30ae15 Tests/RunCMake: Add function to run a specified command-line 11 years ago
RunCMake.cmake 7cd239ed38 Tests/RunCMake: Tell cmake not to report unused command-line options 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``.