Gregor Jasny bf8f9c29e7 Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions 10 years ago
..
CMP0004 d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMP0019 73ae888506 RunCMake: Expect empty output by default. 11 years ago
CMP0022 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0026 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0027 b1bbee3e9a Record more policies on targets when created 11 years ago
CMP0028 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0037 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0038 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0039 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0040 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0041 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0042 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0043 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0045 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0046 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0049 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0050 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0051 911cc9a39e cmTarget: Evaluate CMP0026 and CMP0051 in calling context 11 years ago
CMP0053 9ba91463e6 tests: test CMP0053 in WARN mode when watching variables 11 years ago
CMP0054 188a1f236e If: Introduce policy CMP0054 - don't dereference quoted variables in if() 11 years ago
CMP0055 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CPackInstallProperties 15a8af21e8 Add an "installed file" property scope 11 years ago
CPackRPM 3ec0254727 CPackRPM: Allow multiple path relocation prefixes for one package 10 years ago
CTest bca67c710f build_command: Return a "cmake --build" command-line 12 years ago
CTestMemcheck 1651dc9668 Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test 11 years ago
CTestSubmit c0298947ff Merge topic 'cdash_upload_file_mode' 10 years ago
CheckModules 73ae888506 RunCMake: Expect empty output by default. 11 years ago
CommandLine 44fd71decb cmake: Teach "-E tar" command a "--files-from=" option 10 years ago
CompatibleInterface 93790506f5 cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup 11 years ago
CompileFeatures 1c3918ff02 RunCMake: Remove unneeded files. 10 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 b2282631f6 cmTarget: Do not mistake a preceding error for a CMP0049 failure 11 years ago
DisallowedCommands 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
ExportWithoutLanguage 66b290e7e2 export(): Process the export() command at generate time. 12 years ago
ExternalData 0fe4d8bb3b ExternalData: Add support for custom download scripts 10 years ago
ExternalProject 67cfbf8eb7 ExternalProject: Add unit tests 11 years ago
FPHSA 73ae888506 RunCMake: Expect empty output by default. 11 years ago
FeatureSummary 8372b4553b FeatureSummary: Add unit tests 11 years ago
File_Generate 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
FindPkgConfig fa7d47ac5c Tests: Fix CMP0054 warnings 11 years ago
GeneratorExpression 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
GeneratorPlatform be6a555d7e Tests: Test setting a generator platform in a toolchain file 11 years ago
GeneratorToolset 65624c39e3 VS14: Add Visual Studio 14 generator (#14982) 11 years ago
IfacePaths 6da65b3907 Allow export of targets with INTERFACE_SOURCES. 10 years ago
IncompatibleQt d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
Languages 73ae888506 RunCMake: Expect empty output by default. 11 years ago
ObjectLibrary 2c470b775a add_library: Allow arbitrary non-linked sources in OBJECT libraries 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 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
TargetObjects affe9d56a2 Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970) 11 years ago
TargetPolicies 783bce295b Export: Disallow exported interface includes in src/build tree (#14592). 11 years ago
TargetPropertyGeneratorExpressions 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
TargetSources 6da65b3907 Allow export of targets with INTERFACE_SOURCES. 10 years ago
VisibilityPreset d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
WriteCompilerDetectionHeader 4cf5179c77 WCDH: Make it possible to generate multiple files. 11 years ago
XcodeProject bf8f9c29e7 Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions 10 years ago
add_custom_command e15a7075b5 Add an option for explicit BYPRODUCTS of custom commands (#14963) 11 years ago
add_custom_target e15a7075b5 Add an option for explicit BYPRODUCTS of custom commands (#14963) 11 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 7f2dc8dc54 configure_file: Test that CMake re-runs on input change or output missing 10 years ago
continue 0de867dde2 continue: Add a new CMake language command for loop continuation (#14013) 11 years ago
export cbe7e8fae4 export: Implement EXPORT subcommand (#9822) 12 years ago
file e6db4c5a4e file: Add LOCK subcommand to do file and directory locking 11 years ago
find_dependency a25b809f20 Tests: Check find_dependency empty extra arguments 11 years ago
find_library ce331bab92 find_library: Fix repeat call after changing directory content (#15293) 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
get_property c6d03a1072 tests: add tests for querying properties 10 years ago
if d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
include 77b581c2f0 Policies: omit warnings about unset policies when they are actually set to NEW 11 years ago
include_directories cc15209476 Tests: Split part of include_directories test to a generic location. 10 years ago
include_external_msproject 09ab207c66 Tests: Add generator platform support 11 years ago
install f30022eb07 install: Allow generator expressions in TARGETS DESTINATION (#14317) 10 years ago
interface_library 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
list d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
message 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
no_install_prefix 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
project 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
return d124c41168 return: Add test for returning inside a foreach loop 11 years ago
set d1b62185d6 Merge branch 'parent-scope-tests' into variable-pull-failure 11 years ago
string 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 10 years ago
target_compile_features e0890d03a4 Features: Extend concept to C language. 11 years ago
target_link_libraries 77b581c2f0 Policies: omit warnings about unset policies when they are actually set to NEW 11 years ago
try_compile 33daec1ae9 Merge topic 'test-rerun-cmake' 10 years ago
try_run 223c5cb70b try_run: Add test for bad link libraries. 10 years ago
variable_watch d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMakeLists.txt 6da65b3907 Allow export of targets with INTERFACE_SOURCES. 10 years ago
README.rst 73ae888506 RunCMake: Expect empty output by default. 11 years ago
RunCMake.cmake c0d8e71591 RunCMake: Allow specifying the stderr file for a test. 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``.