Brad King 208524b822 Merge topic 'test-rename-VSSolution' 9 years ago
..
AutoExportDll b42866a34a Drop Visual Studio 6 generator 9 years ago
BuildDepends 1ed74b9d22 Merge topic 'remove-vs6-generator' 9 years ago
CMP0004 d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMP0019 881613c4ab cmMakefile: Remove special handling of LINK_DIRECTORIES property. 10 years ago
CMP0022 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0026 2514e4265c CMP0026: Use compatibility codepath until configure is finished (#15748) 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 d257d68138 add_custom_command: Clarify error when TARGET is out of scope (#15681) 9 years ago
CMP0041 d430cb7c36 Tests: Fix failures when running under the default install prefix (#15566) 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 d6a03b475e cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802) 10 years ago
CMP0055 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0057 aed6239e40 if: Implement new IN_LIST operator 10 years ago
CMP0059 06f61c26cf Do not treat DEFINITIONS as a built-in directory property 10 years ago
CMP0060 882f48e5ba Link libraries by full path even in implicit directories 10 years ago
CMP0064 402bf096ec CMP0064: Fix recorded version of introduction to be 3.4 10 years ago
CMP0065 9784af1b50 CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS 10 years ago
COMPILE_LANGUAGE-genex b734fa4471 Genex: Allow COMPILE_LANGUAGE when processing include directories. 10 years ago
CPack 7c7efd1ed9 CPack/RPM support for upper cased component variables 9 years ago
CPackConfig bc2e54db55 Introduction of CPACK_VERBATIM_VARIABLES variable 10 years ago
CPackInstallProperties 15a8af21e8 Add an "installed file" property scope 11 years ago
CPackSymlinks 5f686b8a6b Tests: Add case for CPack source package with symlinks 10 years ago
CTest 75bd5ca06a Tests: Fix RunCMake.CTest to tolerate source line number changes 10 years ago
CTestCommandLine e61973e1ab CTest: Fix regression in handling of a RUN_SERIAL test that fails 10 years ago
CheckModules 73ae888506 RunCMake: Expect empty output by default. 10 years ago
CommandLine b42866a34a Drop Visual Studio 6 generator 9 years ago
CommandLineTar 6c4781baa9 Tests: Consolidate, refactor and extend -E tar tests 10 years ago
CompatibleInterface 93790506f5 cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup 11 years ago
CompileDefinitions c1bf1a59ff CompileDefinitions: Add unit test for setting empty content. 10 years ago
CompileFeatures 7235334a2f Project: Determine default language dialect for the compiler. 10 years ago
CompilerChange 15610bb5b1 Drop use of configure_file IMMEDIATE option 12 years ago
CompilerLauncher 698f75971b Add options to launch the compiler through tools like ccache or distcc 10 years ago
CompilerNotFound afeb4eb243 nmake/jom: Only warn about bad VS environment if compiler not found. 10 years ago
Configure b2282631f6 cmTarget: Do not mistake a preceding error for a CMP0049 failure 11 years ago
CrosscompilingEmulator 9160d6c241 TestGenerator: Add CROSSCOMPILING_EMULATOR support. 10 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 230f2d6e70 ExternalData: Add option to recursively match under directories 10 years ago
ExternalProject e494763997 ExternalProject: Added new USES_TERMINAL options 10 years ago
FPHSA 73ae888506 RunCMake: Expect empty output by default. 10 years ago
FeatureSummary 38ef2b7363 FeatureSummary: Print each feature info only once 10 years ago
File_Generate 9e1689413f File(GENERATE): Process genex evaluation files for each language. 10 years ago
FindMatlab 8444809c47 FindMatlab: fix reconfiguration of Matlab_ROOT_DIR 10 years ago
FindPkgConfig 6f4f905483 FindPkgConfig: set correctly named variables in cache (#15903) 9 years ago
Framework e76ee2c006 iOS: Fix framework resource directory layout (#15848) 10 years ago
GNUInstallDirs c8bd37ec68 GNUInstallDirs: Add special cases for certain prefixes 10 years ago
GeneratorExpression ca6ba3fee5 Genex: Add a SHELL_PATH expression 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 d430cb7c36 Tests: Fix failures when running under the default install prefix (#15566) 10 years ago
IncludeWhatYouUse b3475ba57b Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS 10 years ago
IncompatibleQt d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
Languages 327490e698 enable_language: Allow CMakeDetermine<LANG>Compiler module to fail early 10 years ago
LinkStatic 18d7f8fbfb Tests: Move LINK_SEARCH_{START,END}_STATIC case to dedicated test 10 years ago
Make f0cad1939f Tests: Add test for TARGET_MESSAGES global property 10 years ago
Ninja e9bf8ec849 Ninja: Add test for `$subdir/all` targets 9 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
PolicyScope 378185fb7f Tests: Add case for unmatched cmake_policy({PUSH,POP}) 10 years ago
PositionIndependentCode 2e60b5fcf7 cmTarget: Report origin of COMPATIBLE_INTERFACE properties. 12 years ago
Swift 1aa29f0db6 Swift: Remove positive Swift language tests 10 years ago
Syntax 821f91d6ab cmMakefile: Create a scoped context for parsing listfiles. 10 years ago
TargetObjects affe9d56a2 Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970) 11 years ago
TargetPolicies 9784af1b50 CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS 10 years ago
TargetPropertyGeneratorExpressions 820777af03 Tests: Don't rely on ordering of targets in maps. 10 years ago
TargetSources 6da65b3907 Allow export of targets with INTERFACE_SOURCES. 10 years ago
ToolchainFile 72e0dc58d3 Diagnose recursive project/enable_language without crashing (#15999) 9 years ago
VS10Project 6122909c33 VS: Add option to set `ConfigurationType` of a .vcxproj file 9 years ago
VSSolution 5c1f4da83d Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution} 9 years ago
VisibilityPreset 726e461b38 CMP0063: Split unit test by target type. 10 years ago
WriteCompilerDetectionHeader 4cf5179c77 WCDH: Make it possible to generate multiple files. 11 years ago
XcodeProject e3fc2899c8 Fix iOS combined feature for single architecture targets 9 years ago
add_custom_command d257d68138 add_custom_command: Clarify error when TARGET is out of scope (#15681) 9 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
add_subdirectory 010c595986 Tests: Add case for add_subdirectory inside a function 10 years ago
alias_targets d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
build_command 226df303f9 CTest: Stop telling 'make' to ignore errors with -i 10 years ago
cmake_minimum_required 7d47c69365 Drop compatibility with CMake < 2.4 12 years ago
cmake_parse_arguments 430251245e cmake_parse_arguments: Additional regression tests 9 years ago
configure_file 024e25e485 Tests: Add more signature tests to RunCMake.configure_file test 10 years ago
continue 0de867dde2 continue: Add a new CMake language command for loop continuation (#14013) 11 years ago
ctest_build 601ff0ec55 CTest: Optionally add a ChangeId attribute on XML Site tags 10 years ago
ctest_configure f999dc0bbf ctest_configure: Add QUIET option 10 years ago
ctest_coverage fc58bdb9ad ctest_coverage: Add QUIET option 10 years ago
ctest_memcheck bf24b6c501 Tests: Guard more CTest tests against parallel execution. 10 years ago
ctest_start 0699e0d3e4 Tests: Move CTestTestConfigFileInBuildDir into RunCMake.ctest_start 10 years ago
ctest_submit 2859d9ef6b Tests: Extend ctest_submit host lookup failure matching (#15958) 9 years ago
ctest_test 6a56c8247f Tests: Disable parallel test execution while running ctest_test 10 years ago
ctest_upload ff1ddd2a73 ctest_upload: Add QUIET option 10 years ago
execute_process f65bb82f36 execute_process: Improve stdout/stderr merging 10 years ago
export 7e9f908ef5 export: Reject custom target exports earlier (#15657) 10 years ago
file 6c9586f9c7 file(DOWNLOAD): Fill STATUS variable on hash mismatch (#15987) 9 years ago
find_dependency a25b809f20 Tests: Check find_dependency empty extra arguments 11 years ago
find_file ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370) 10 years ago
find_library ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370) 10 years ago
find_package b219ff94ac Tests: Add case for package version file unmatched policy scope 10 years ago
find_path ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370) 10 years ago
find_program b7b3b675fd Merge topic 'fix-find_program-regression' 10 years ago
get_filename_component e89ea3d190 get_filename_component: Teach new BASE_DIR parameter. 10 years ago
get_property 45c5f8cad2 Add SOURCE_DIR and BINARY_DIR target properties 10 years ago
if 6ffc432367 cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944) 9 years ago
include 77b581c2f0 Policies: omit warnings about unset policies when they are actually set to NEW 11 years ago
include_directories a4bd30104f include_directories: Fix regression in BEFORE option (#15693) 10 years ago
include_external_msproject 09ab207c66 Tests: Add generator platform support 11 years ago
install 3b8c0fbfd7 Merge topic 'install-EXCLUDE_FROM_ALL' 9 years ago
interface_library ac14cbf017 Allow add_dependencies() on INTERFACE libraries (#15414) 10 years ago
list 0205f882ae list: Add FILTER subcommand (#3986) 9 years ago
message 28f2d750ed Add -Werror and -Wno-error command-line options 9 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
set_property ed258d606b Tests: Cover set_property for buildsystem directory properties 10 years ago
string 2b18cdcaba string: add APPEND subcommand 10 years ago
target_compile_features e0890d03a4 Features: Extend concept to C language. 11 years ago
target_link_libraries 87f44b7525 Fix export of STATIC library PRIVATE non-target dependencies 9 years ago
try_compile 7f1bd9fe69 try_compile: Add option to control type of target 9 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
while e5ca59b456 Tests: Move command failure cases into RunCMake infrastructure 10 years ago
CMakeLists.txt 5c1f4da83d Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution} 9 years ago
README.rst 9b50388b09 Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck) 10 years ago
RunCMake.cmake b42866a34a Drop Visual Studio 6 generator 9 years ago
RunCTest.cmake 9b50388b09 Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck) 10 years ago
pseudo_emulator.c 579c4bec6e Properties: Add CROSSCOMPILING_EMULATOR target property. 10 years ago
pseudo_iwyu.c ada5ffce7b Add options to run include-what-you-use with the compiler 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.

Alternatively, if the test is to cover running ``ctest -S`` then use::

include(RunCTest)
run_ctest(SubTest1)
...
run_ctest(SubTestN)

and create ``test.cmake.in``, ``CTestConfig.cmake.in``, and
``CMakeLists.txt.in`` files to be configured for each case.

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