CMake/Tests/RunCMake
Brad King aec11372a5 Merge topic 'rpm_multi_prefix'
3ec02547 CPackRPM: Allow multiple path relocation prefixes for one package
2015-02-03 09:46:21 -05:00
..
CMP0004
CMP0019 RunCMake: Expect empty output by default. 2014-12-31 16:34:34 +01:00
CMP0022
CMP0026 cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338) 2015-01-13 09:36:20 +01:00
CMP0027 Record more policies on targets when created 2014-03-06 11:05:47 -05:00
CMP0028 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0037 Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
CMP0038 Record more policies on targets when created 2014-03-06 11:05:47 -05:00
CMP0039 Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
CMP0040 Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
CMP0041 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0042 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0043 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0045 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0046 Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
CMP0049 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0050 Tests: Simplify and document policy scopes in RunCMake.CMP* tests 2014-03-06 11:07:03 -05:00
CMP0051 cmTarget: Evaluate CMP0026 and CMP0051 in calling context 2014-05-09 11:24:15 -04:00
CMP0053 tests: test CMP0053 in WARN mode when watching variables 2014-05-22 11:13:29 -04:00
CMP0054 If: Introduce policy CMP0054 - don't dereference quoted variables in if() 2014-09-11 21:23:17 +02:00
CMP0055 break: Add policy CMP0055 to check calls strictly 2014-11-25 14:14:20 -05:00
CPackInstallProperties Add an "installed file" property scope 2014-05-28 12:28:18 -04:00
CPackRPM CPackRPM: Allow multiple path relocation prefixes for one package 2015-01-29 10:48:58 -05:00
CTest
CTestMemcheck Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test 2014-12-18 10:12:15 -05:00
CTestSubmit Merge topic 'cdash_upload_file_mode' 2015-01-22 11:16:45 -05:00
CheckModules RunCMake: Expect empty output by default. 2014-12-31 16:34:34 +01:00
CommandLine cmake: Teach "-E tar" command a "--files-from=" option 2015-01-26 13:28:31 -05:00
CompatibleInterface cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup 2014-07-07 08:52:42 -04:00
CompileFeatures Features: Define meaning for no language standard default 2015-01-29 15:01:40 -05:00
CompilerChange
CompilerNotFound
Configure cmTarget: Do not mistake a preceding error for a CMP0049 failure 2014-07-30 13:48:33 -04:00
DisallowedCommands
ExportWithoutLanguage
ExternalData ExternalData: Add support for custom download scripts 2015-01-15 10:48:09 -05:00
ExternalProject ExternalProject: Add unit tests 2014-11-03 16:15:14 +01:00
FPHSA RunCMake: Expect empty output by default. 2014-12-31 16:34:34 +01:00
FeatureSummary FeatureSummary: Add unit tests 2014-03-03 19:52:13 +01:00
File_Generate file(GENERATE): Re-run cmake when appropriate. 2014-11-19 00:19:09 +01:00
FindPkgConfig Tests: Fix CMP0054 warnings 2014-09-16 09:06:29 -04:00
GeneratorExpression Encoding: Modify tests to work using non-ascii paths. 2015-01-08 20:56:51 -07:00
GeneratorPlatform Tests: Test setting a generator platform in a toolchain file 2014-09-15 10:27:00 -04:00
GeneratorToolset VS14: Add Visual Studio 14 generator (#14982) 2014-06-25 14:51:19 -04:00
IncompatibleQt
Languages RunCMake: Expect empty output by default. 2014-12-31 16:34:34 +01:00
ObjectLibrary add_library: Allow arbitrary non-linked sources in OBJECT libraries 2014-07-09 09:43:42 -04:00
ObsoleteQtMacros
PositionIndependentCode
SolutionGlobalSections
Syntax Merge topic 'fix-lexer-open-square' 2014-08-19 09:48:36 -04:00
TargetObjects Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970) 2014-07-14 09:09:32 -04:00
TargetPolicies Export: Disallow exported interface includes in src/build tree (#14592). 2014-04-09 10:38:49 +02:00
TargetPropertyGeneratorExpressions Genex: Fix stack overflow in transitive property evaluation. 2014-07-02 00:09:38 +02:00
TargetSources Export: Disallow export of targets with INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
VisibilityPreset
WriteCompilerDetectionHeader WCDH: Make it possible to generate multiple files. 2014-11-24 21:54:41 +01:00
XcodeProject Xcode: Add source file property to control file type (#14854) 2014-05-15 14:34:52 -04:00
add_custom_command Add an option for explicit BYPRODUCTS of custom commands (#14963) 2014-11-14 16:16:00 -05:00
add_custom_target Add an option for explicit BYPRODUCTS of custom commands (#14963) 2014-11-14 16:16:00 -05:00
add_dependencies
alias_targets
build_command
cmake_minimum_required
configure_file configure_file: Test that CMake re-runs on input change or output missing 2015-01-27 11:18:37 -05:00
continue continue: Add a new CMake language command for loop continuation (#14013) 2014-12-01 09:50:49 -05:00
export
file file: Add LOCK subcommand to do file and directory locking 2014-12-03 09:47:44 -05:00
find_dependency Tests: Check find_dependency empty extra arguments 2014-03-13 15:57:03 -04:00
find_library find_library: Fix repeat call after changing directory content (#15293) 2014-12-08 15:35:50 -05:00
find_package
get_filename_component
get_property tests: add tests for querying properties 2015-01-11 11:45:44 -05:00
if
include Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
include_directories Tests: Speed up RunCMake.include_directories test 2014-06-30 14:37:38 -04:00
include_external_msproject Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
install install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761) 2014-06-24 13:18:20 -04:00
interface_library Disallow INTERFACE libraries with add_custom_command(TARGET). 2014-03-19 15:51:21 +01:00
list
message
no_install_prefix
project project: Manage VERSION variables 2014-01-29 09:45:18 -05:00
return return: Add test for returning inside a foreach loop 2014-11-25 14:37:39 -05:00
set Merge branch 'parent-scope-tests' into variable-pull-failure 2014-10-24 13:34:30 -04:00
string file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
target_compile_features Features: Extend concept to C language. 2014-05-15 00:15:18 +02:00
target_link_libraries Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
try_compile Merge topic 'test-rerun-cmake' 2015-01-27 11:22:06 -05:00
try_run try_run: Add test for bad link libraries. 2015-01-26 10:05:30 -05:00
variable_watch
CMakeLists.txt Merge topic 'rpm_multi_prefix' 2015-02-03 09:46:21 -05:00
README.rst RunCMake: Expect empty output by default. 2014-12-31 16:34:34 +01:00
RunCMake.cmake Tests/RunCMake: Normalize newlines before checking actual output 2015-01-27 11:18:36 -05:00

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 ``<Test>/``.

2. In ``./CMakeLists.txt`` call ``add_RunCMake_test`` and pass the
   test directory name ``<Test>``.

3. Create script ``<Test>/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 ``<Test>/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 ``<Test>/<SubTest>.cmake`` file for each sub-test named
   above containing the actual test code.  Optionally create files
   containing expected test results:

   ``<SubTest>-result.txt``
    Process result expected if not "0"
   ``<SubTest>-stdout.txt``
    Regex matching expected stdout content
   ``<SubTest>-stderr.txt``
    Regex matching expected stderr content, if not "^$"
   ``<SubTest>-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 ``<SubTest>-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``.