Kyle Edwards edcb545a24 install: add test for new NAMELINK_COMPONENT parameter 7 years ago
..
Android da294a039d Android: Add support for NDK r17 7 years ago
AndroidMK b6d68766b1 Android.mk: Fix export of static libraries with PRIVATE dependencies 7 years ago
AndroidTestUtilities 8a5cb84b0e AndroidTestUtilities: do not require ExternalData unconditionally 8 years ago
AutoExportDll c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
BuildDepends c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
CMP0004 d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMP0019 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
CMP0022 70c6557285 Tests: Fix RunCMake.CMP0022 tll case for Debug configuration 8 years ago
CMP0026 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
CMP0027 b1bbee3e9a Record more policies on targets when created 11 years ago
CMP0028 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
CMP0037 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0038 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0039 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0040 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0041 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0042 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0043 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0045 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0046 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0049 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0050 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0051 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0053 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0054 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0055 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
CMP0057 aed6239e40 if: Implement new IN_LIST operator 10 years ago
CMP0059 845cb217a7 CMP0059: Fix typo in policy description 9 years ago
CMP0060 c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
CMP0064 402bf096ec CMP0064: Fix recorded version of introduction to be 3.4 10 years ago
CMP0065 566086187f Fix typos. 9 years ago
CMP0068 1ba91291e3 Add policy CMP0068 separate install_name and RPATH settings on macOS 8 years ago
CMP0069 ba247ccaba IPO: Consider support for each language separately 8 years ago
CPack 3ab7bf8285 Various typo fixes 8 years ago
CPackCommandLine 6f2701abf6 CPack: Fix crash on invalid generator name 7 years ago
CPackConfig bc2e54db55 Introduction of CPACK_VERBATIM_VARIABLES variable 10 years ago
CPackInstallProperties 69050f4d16 Tests: Use full output paths in file(GENERATE) calls 8 years ago
CPackSymlinks 5f686b8a6b Tests: Add case for CPack source package with symlinks 10 years ago
CSharpCustomCommand ec409a116f Vs: fix CSharp custom command by introducing inline MSBuild <Targets>s 8 years ago
CSharpReferenceImport 359544a907 add tests for using target_link_libraries() with imported managed targets 7 years ago
CTest 70c50aa23c Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF" 7 years ago
CTestCommandLine 6be53c6695 CTest: Add options to control test process affinity to CPUs 7 years ago
CTestTimeoutAfterMatch 993e48d045 CTest: Optionally use a secondary test timeout after matching output 9 years ago
CacheNewline c42b377c29 cmCacheManager: Test and document newline truncation behavior 7 years ago
CheckIPOSupported ba247ccaba IPO: Consider support for each language separately 8 years ago
CheckModules a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES 7 years ago
ClangTidy 80ebc55a7c cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero 9 years ago
CommandLine 5c10e8f608 Merge topic 'fix-crash-trace-exp-uninit-vars' 7 years ago
CommandLineTar 6c4781baa9 Tests: Consolidate, refactor and extend -E tar tests 10 years ago
CompatibleInterface d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
CompileDefinitions c1bf1a59ff CompileDefinitions: Add unit test for setting empty content. 10 years ago
CompileFeatures e556f1b909 CompileFeatures: Makes tests work with meta-feature only 8 years ago
CompilerChange 15610bb5b1 Drop use of configure_file IMMEDIATE option 12 years ago
CompilerLauncher f19c70c3d2 Fortran: Add option to run the compiler through launcher tools 8 years ago
CompilerNotFound afeb4eb243 nmake/jom: Only warn about bad VS environment if compiler not found. 10 years ago
Configure 25b6e7b710 Tolerate removed/replaced CMakeCache.txt with old CMakeFiles/ 9 years ago
Cppcheck 3bbe95f58a Clean up iwyu code to not be one big if statement. 8 years ago
Cpplint bfcc20343c Update cpplint support to return 0 and mark warnings for CDash. 8 years ago
CrosscompilingEmulator f648b9be63 Tests: Check that CROSSCOMPILING_EMULATOR is not used on imported targets 9 years ago
DisallowedCommands 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
ExportWithoutLanguage d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
ExternalData 230f2d6e70 ExternalData: Add option to recursively match under directories 10 years ago
ExternalProject 7ad981c8f7 ExternalProject: Fix cache generation when last args ends with "-NOTFOUND" 7 years ago
FPHSA 5dc215e03b FPHSA: fix typo in comment 8 years ago
FeatureSummary 6f62c66b2c FeatureSummary: Add FeatureSummary_<TYPE>_DESCRIPTION global properties 8 years ago
FetchContent 1e56634faa FetchContent: Add tests 8 years ago
File_Generate c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
FindBoost c044b9ae84 FindBoost: Improve messages when a Boost CMake package is found 8 years ago
FindGTK2 4bc2c16b5d FindGTK2: Add unit test to check variables when run twice 8 years ago
FindMatlab 59fb9e89b2 FindMatlab: Matlab Runtime Compiler support 7 years ago
FindOpenGL 2ea17412a9 FindOpenGL: Add policy CMP0072 to prefer GLVND for legacy GL 8 years ago
FindPkgConfig 3ab7bf8285 Various typo fixes 8 years ago
Framework 58d9297eef Tests: Fix RunCMake.Framework ios arch for Xcode 9 8 years ago
GNUInstallDirs 913736f17d Tests: Fix RunCMake.GNUInstallDirs on BSD platforms 8 years ago
GenerateExportHeader b1ae9aaf79 GenerateExportHeader: add release notes, tests for include guard changes 7 years ago
GeneratorExpression 4d15046edd Genex: Add $<TARGET_GENEX_EVAL:...> and $<GENEX_EVAL:...> 7 years ago
GeneratorInstance 9ffb35386f VS: Select and save a VS 2017 instance persistently 8 years ago
GeneratorPlatform bdc679a8ae VS15: Add Visual Studio 15 generator 9 years ago
GeneratorToolset 7373b389eb Xcode: Drop support for Xcode versions below 3 8 years ago
GetPrerequisites 1a7b8c8321 GetPrerequisites: Restore behavior on missing binary of not clearing list 8 years ago
GoogleTest 30b7c40ad8 Merge topic 'gtest_discover_tests_timeout' 7 years ago
IfacePaths a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
IncludeWhatYouUse d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
IncompatibleQt d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
Languages d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
LinkStatic 18d7f8fbfb Tests: Move LINK_SEARCH_{START,END}_STATIC case to dedicated test 10 years ago
LinkWhatYouUse 96242f8022 Add options to run `ldd -u -r` as a "link-what-you-use" tool 9 years ago
Make 2d64f9f08d include_regular_expression: Fix propagation to subdirectories 7 years ago
MultiLint 992962c76d cmcmd: Restore support for running multiple lint tools 8 years ago
Ninja 625b8f9076 Ninja: Avoid empty phony edges for target ordering 7 years ago
ObjectLibrary 7776ce98c3 Tests: Add cases for usage requirements of linked object libs 7 years ago
ObsoleteQtMacros d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
PolicyScope 7c36d2067b cmListFileBacktrace: Refactor storage to provide efficient value semantics 9 years ago
PositionIndependentCode d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
RuntimePath c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
SourceProperties 0448311179 sourceFile properties: add property INCLUDE_DIRECTORIES 7 years ago
Swift 1aa29f0db6 Swift: Remove positive Swift language tests 10 years ago
Syntax a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
TargetObjects 69050f4d16 Tests: Use full output paths in file(GENERATE) calls 8 years ago
TargetPolicies 7723e9a058 Do not produce legacy _LIB_DEPENDS cache entries 7 years ago
TargetPropertyGeneratorExpressions d71be346a4 Tests: Speed up RunCMake.TargetPropertyGeneratorExpressions 7 years ago
TargetSources 344d149ae4 VS,Xcode: Add CMakeLists.txt sources without mutating targets 8 years ago
ToolchainFile 8a98cf6432 Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain files 9 years ago
VS10Project fe0082875a Merge topic 'vs-sdk-dirs' 7 years ago
VSSolution 5cf9c3d0cc VS: Add SolutionGuid to generated .sln files 8 years ago
VisibilityPreset 726e461b38 CMP0063: Split unit test by target type. 10 years ago
WorkingDirectory e60e4dfc88 cmWorkingDirectory: Check success of current dir changes 7 years ago
WriteCompilerDetectionHeader f38d050231 WCDH: introduce BARE_FEATURES 7 years ago
XcodeProject 8480c2afc0 Restore support for explicitly referenced CMakeLists.txt sources 7 years ago
add_custom_command f59c33a763 VS: Generate a custom command only in the least dependent target 7 years ago
add_custom_target 1296a0eada Ninja: Fix inter-target order-only dependencies of custom commands 9 years ago
add_dependencies d9f836e956 Add a getter for manually added target dependencies 9 years ago
add_executable 4e7f67383f Defer check for sources within a target until generation. 8 years ago
add_library 7723e9a058 Do not produce legacy _LIB_DEPENDS cache entries 7 years ago
add_subdirectory df32e564ae Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101) 9 years ago
alias_targets 494906a8a2 Add support for IMPORTED GLOBAL targets to be aliased 8 years ago
build_command 226df303f9 CTest: Stop telling 'make' to ignore errors with -i 10 years ago
cmake_minimum_required 8dc97acb03 cmake_minimum_required: Tolerate unknown future arguments 7 years ago
cmake_parse_arguments 66c70cd9f1 cmake_parse_arguments: Add additional unit tests 9 years ago
configure_file 024e25e485 Tests: Add more signature tests to RunCMake.configure_file test 10 years ago
continue 7a649111cd Use string(APPEND) in Tests 9 years ago
ctest_build 19beee46cc ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project 9 years ago
ctest_cmake_error d328dc6853 CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands 9 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_disabled_test 851b6c1595 cmCTestTestHandler: indicate why a test did not run 8 years ago
ctest_fixtures fbe91dba6a CTest: Check failed fixture dependencies before test command and args 8 years ago
ctest_labels_for_subprojects 5b829c89b8 CTest: Weight reported test times by PROCESSORS in summaries 8 years ago
ctest_memcheck e116f2a5de ctest_memcheck: Fix sanitizers when MemoryCheckSanitizerOptions is empty 8 years ago
ctest_skipped_test 851b6c1595 cmCTestTestHandler: indicate why a test did not run 8 years ago
ctest_start 74092d92bf cmCTestScriptHandler: Add new field ShouldRunCurrentScript 7 years ago
ctest_submit 1a7d00bd12 ctest_submit: Add HTTPHEADER option 8 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 8caec41e6e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword 8 years ago
export 6db61f0725 Export: allow exporting of additional properties 7 years ago
file 20612978c8 Add tests for `file(GLOB)` CONFIGURE_DEPENDS flag 7 years ago
find_dependency ab358d6a85 Improve find_dependency argument handling 8 years ago
find_file b30b32a493 Drop find_(library|file|path) prefixes from PATH on non-Windows 9 years ago
find_library 6f5aede716 find_library: Skip 'lib => lib<arch>' searches if one symlinks the other 8 years ago
find_package 3f479a3ca3 find_package: Improve CMP0074 warning messages 7 years ago
find_path 188baef00c find_path: Fix location of <dir/header.h> in a framework on OS X 9 years ago
find_program b7b3b675fd Merge topic 'fix-find_program-regression' 10 years ago
foreach fb114a40aa Tests: Add test for bad foreach inside a function 8 years ago
get_filename_component 31f73eb12d get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics 8 years ago
get_property b513a879ec Tests management: add TESTS directory property 7 years ago
if edac95b955 cmIfCommand: Reject duplicate else() and misplaced elseif() 8 years ago
include d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
include_directories a4bd30104f include_directories: Fix regression in BEFORE option (#15693) 10 years ago
include_external_msproject 227de0b95d include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG> 8 years ago
include_guard c96f43b7dd include_guard: add tests for the feature 8 years ago
install edcb545a24 install: add test for new NAMELINK_COMPONENT parameter 7 years ago
interface_library 81868e6bad CUDA: Add cu as default source file extension 8 years ago
list dca2347980 list: Add TRANSFORM sub-command 7 years ago
message 777e87ae00 Fix trivial typos in text 8 years ago
no_install_prefix 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
project 73f9b2974c project: Add HOMEPAGE_URL named parameter 7 years ago
return d124c41168 return: Add test for returning inside a foreach loop 11 years ago
separate_arguments 2a207aaca1 separgs: Add a NATIVE_COMMAND mode 8 years ago
set d1b62185d6 Merge branch 'parent-scope-tests' into variable-pull-failure 11 years ago
set_property 9cc97ab4dc Tests: Add tests for INHERITED property chaining 7 years ago
string 689eeb67cb string: Add JOIN subcommand 7 years ago
target_compile_features fe4b25ec2f Teach target_* commands to set INTERFACE properties of IMPORTED targets 8 years ago
target_link_libraries b0e2f1415e target_link_libraries: Slightly fix some error-messages. 8 years ago
test_include_dirs c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
try_compile 5599d858c7 CUDA: Port test cases to Windows with MSVC host compiler 9 years ago
try_run d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
variable_watch 65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE 7 years ago
while 1afbe7d2cc Make error message of standalone endwhile command consistent 9 years ago
CMakeLists.txt edcb545a24 install: add test for new NAMELINK_COMPONENT parameter 7 years ago
README.rst a7a6ae5edd Tests: Update RunCMake/README.rst to clarify meaning of -result.txt 8 years ago
RunCMake.cmake eb80af9093 Drop Visual Studio 8 2005 generator 7 years ago
RunCTest.cmake f725b20be3 Update tests that expect uncompressed output 9 years ago
exit_code.c d6051ca39e execute_process: Add option to get results of every child 8 years ago
pseudo_cppcheck.c 3bbe95f58a Clean up iwyu code to not be one big if statement. 8 years ago
pseudo_cpplint.c 0618ddf6b1 Add properties to run the cpplint style checker with the compiler 8 years ago
pseudo_emulator.c d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
pseudo_emulator_custom_command.c e7480d670b Fix custom command target substitution with CROSSCOMPILING_EMULATOR 9 years ago
pseudo_iwyu.c 44de615781 cmake: Comment why we ignore the include-what-you-use return code 9 years ago
pseudo_tidy.c 80ebc55a7c cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero 9 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``
Regex matching expected process result, 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``.