CMake/Tests/RunCMake
Brad King e13704ce72 Add directory property to list imported targets
Model the change after commit cbca65826c (Add directory property to list
buildsystem targets, 2016-09-19, v3.7.0-rc1~79^2~1).

Fixes: #22291
2021-06-10 15:52:12 -04:00
..
ABI TestBigEndian: Re-implement using byte order detected from ABI check 2020-11-06 09:17:30 -05:00
add_custom_command add_custom_command: Target-dependent generator expression support 2021-05-31 10:39:58 +03:00
add_custom_target Tests: Add cases for Ninja Multi-Config cross-config custom commands 2020-12-15 08:17:55 -05:00
add_dependencies Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
add_executable Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES 2021-05-26 15:43:38 -04:00
add_library Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES 2021-05-26 15:43:38 -04:00
add_link_options Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...> 2020-02-26 16:38:42 +01:00
add_subdirectory CMP0082: Check EXCLUDE_FROM_ALL property at generate time 2021-05-24 13:56:59 -04:00
add_test CTest: exit nonzero after message(SEND_ERROR|FATAL_ERROR) 2020-08-26 11:27:05 -04:00
alias_targets Merge topic 'imported-local-target-alias' 2020-07-13 07:53:01 -04:00
Android Tests: Update RunCMake.Android for NDK r22 2021-03-03 10:27:50 -05:00
AndroidMK
AndroidTestUtilities add_test: Revert "Allow special characters in test name" 2020-07-28 08:04:11 +10:00
AppleSilicon Tests: Cover macOS host architecture selection on Apple Silicon hosts 2020-12-10 12:08:15 -05:00
ArtifactOutputDirs OUTPUT_DIRECTORY: Support tgt genex in output artifact vars 2021-01-26 12:13:15 -05:00
AutoExportDll bindexplib: Do not export symbols from managed code 2020-05-04 09:58:09 +02:00
Autogen
build_command build_command: Add the PARALLEL_LEVEL argument 2021-05-04 20:17:17 +02:00
BuildDepends VS: Add support for add_custom_command DEPFILE 2021-06-09 10:09:58 -04:00
BundleUtilities Add deprecation warnings for policies CMP0081 and below 2021-02-10 09:25:32 -05:00
Byproducts
CacheNewline
CheckCompilerFlag HIP: Add HIP to all the Check* modules 2021-06-07 19:25:33 +00:00
CheckIPOSupported
CheckLinkerFlag HIP: Add HIP to all the Check* modules 2021-06-07 19:25:33 +00:00
CheckModules Add deprecation warnings for policies CMP0075 and below 2020-10-13 14:36:00 -04:00
CheckSourceCompiles HIP: Add HIP to all the Check* modules 2021-06-07 19:25:33 +00:00
CheckSourceRuns HIP: Add HIP to all the Check* modules 2021-06-07 19:25:33 +00:00
ClangTidy clang-tidy: allow OBJC and OBJCXX 2020-11-05 11:39:32 -08:00
cmake_language Tests: Fix typos and spelling in test strings 2021-05-07 17:00:15 +02:00
cmake_minimum_required Deprecate compatibility with CMake versions older than 2.8.12 2020-06-18 09:52:05 -04:00
cmake_parse_arguments
cmake_path cmake_path: rename 'GET ... RELATIVE_PATH' to 'GET ... RELATIVE_PART' 2021-01-28 11:06:31 +11:00
CMakePresets Tests: Fix RunCMake.CMakePresets example PATH format 2021-05-05 10:13:35 -04:00
CMakePresetsBuild Merge branch 'backport-3.20-presets-build-fixes' into presets-build-fixes 2021-06-08 07:49:50 -04:00
CMakePresetsTest CMakePresets.json: Add the ability to conditionally disable presets 2021-03-22 15:04:54 -04:00
CMakeRelease Utilities/Release: Update file table for 3.20.0 2021-04-05 13:47:02 -04:00
CMakeRoleGlobalProperty
CMP0004
CMP0019 Deprecate compatibility with CMake versions older than 2.8.12 2020-06-18 09:52:05 -04:00
CMP0022 Deprecate compatibility with CMake versions older than 2.8.12 2020-06-18 09:52:05 -04:00
CMP0026 GENERATED prop: Check CMP0118 policy and warn in certain situations 2020-11-24 17:54:54 +01:00
CMP0027 Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CMP0028 Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CMP0037 Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CMP0038
CMP0039
CMP0040
CMP0041 cmake: add support for --install-prefix command argument 2021-03-04 10:50:24 -05:00
CMP0042 Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CMP0043 Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CMP0045 Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CMP0046
CMP0049
CMP0050
CMP0051
CMP0053
CMP0054
CMP0055
CMP0057
CMP0059
CMP0060
CMP0064
CMP0065
CMP0068
CMP0069
CMP0081 Add deprecation warnings for policies CMP0081 and below 2021-02-10 09:25:32 -05:00
CMP0102 cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache 2020-01-20 15:49:29 -05:00
CMP0104 CUDA: Fix tests with CUDAARCHS set 2020-11-30 17:57:27 +02:00
CMP0106 Tests: Make RunCMake.CMP0106 expected output robust to line number changes 2020-12-02 21:00:27 +05:00
CMP0111 cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries 2020-11-23 15:56:28 -05:00
CMP0115 CMP0115: Require source file extensions to be explicit 2020-10-13 09:46:54 -04:00
CMP0116 Tests: Test per-CC behavior of CMP0116 2021-02-23 09:17:12 -05:00
CMP0118 CMP0118: Fix NEW behavior when looking up target sources 2021-03-18 09:57:49 -04:00
CMP0119 Compile with explicit language flag when source LANGUAGE property is set 2020-12-02 11:39:11 -05:00
CMP0121 cmListCommand: add a policy for failing on invalid indicies 2021-02-18 08:30:55 -05:00
CMP0125 find_*: ensure consistent behavior for cache variables 2021-05-12 11:11:56 +02:00
CMP0126 set(CACHE): do not remove normal variable 2021-05-20 17:50:13 +02:00
CommandLine cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variable 2021-06-03 08:32:44 -04:00
CommandLineTar
CompatibleInterface Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CompileDefinitions
CompileFeatures
CompilerArgs Toolchain: Test compiler initial settings 2020-08-03 12:34:46 -04:00
CompilerChange Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
CompilerLauncher HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
CompilerNotFound Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
Configure Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
configure_file MSYS: Add support for running under MSYS runtime environment 2021-04-26 14:27:34 -04:00
continue
CPack Tests: Improve RunCMake.CPack*.SOURCE_PACKAGE test error formatting 2021-06-09 08:15:30 -04:00
CPackCommandLine
CPackConfig
CPackInstallProperties
CPackSymlinks Tests: Check symlinks to directories in RunCMake.CPackSymlinks 2021-03-10 17:39:55 +00:00
Cppcheck
Cpplint
CrosscompilingEmulator add_test: Revert "Allow special characters in test name" 2020-07-28 08:04:11 +10:00
CSharpCustomCommand
CSharpReferenceImport
CTest Tests: Add case verifying CTest module SITE variable 2020-10-22 10:20:43 -04:00
ctest_build ctest_build: Add the PARALLEL_LEVEL argument 2021-05-04 20:30:18 +02:00
ctest_cmake_error
ctest_configure
ctest_coverage
ctest_disabled_test
ctest_fixtures
ctest_labels_for_subprojects
ctest_memcheck CTest: Rename CudaMemcheck to CudaSanitizer 2020-11-17 21:06:30 +01:00
ctest_skipped_test
ctest_start Tests: Add tests to demonstrate when CTEST_NIGHTLY_START_TIME is needed 2020-04-29 15:36:12 -04:00
ctest_submit Tests: Add host to ENV{no_proxy} when DNS lookup failure is expected 2021-01-29 16:22:15 -05:00
ctest_test ctest: allow test output to override the 'details' field 2021-06-09 08:31:32 -04:00
ctest_update Fix typos identified using codespell 2020-07-22 12:44:47 -04:00
ctest_upload
CTestCommandExpandLists
CTestCommandLine CTest: Exit coverage handling early if no binary dir 2021-06-02 08:41:09 -04:00
CTestResourceAllocation Help: Clarify search order for resource spec file 2020-07-07 12:21:58 -04:00
CTestTimeout CTest: Fix reported duration on timeout when grindchild keeps pipes open 2020-03-26 14:35:54 -04:00
CTestTimeoutAfterMatch
DependencyGraph Tests: Update RunCMake.DependencyGraph to canonicalize paths when comparing 2021-01-28 09:05:35 -05:00
DisallowedCommands Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
ExcludeFromAll Tests: Fix typos and spelling in test name 2021-05-07 17:00:14 +02:00
execute_process execute_process: Improve COMMAND_ERROR_IS_FATAL error capture scenarios 2020-12-10 06:09:59 -05:00
export export: Do not fail generation for separate namelink only case 2020-12-01 07:35:17 -05:00
ExportCompileCommands Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule 2021-05-28 15:41:38 -04:00
ExportWithoutLanguage Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
ExternalData ExternalData: add support for suppressing progress during the build 2020-10-23 09:49:51 -04:00
ExternalProject Merge topic 'codespell' 2021-05-10 10:13:06 -04:00
FeatureSummary Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
FetchContent Revert ExternalProject and FetchContent refactoring 2021-03-10 09:07:44 +11:00
file MSYS: Add support for running under MSYS runtime environment 2021-04-26 14:27:34 -04:00
File_Archive file(ARCHIVE_CREATE): Add option to control compression level 2020-09-21 13:08:11 -04:00
File_Configure file(CONFIGURE): Use text mode for default OUTPUT content 2021-02-02 15:18:48 +01:00
File_Generate MSYS: Add support for running under MSYS runtime environment 2021-04-26 14:27:34 -04:00
file-CHMOD MSYS: Add support for running under MSYS runtime environment 2021-04-26 14:27:34 -04:00
file-GET_RUNTIME_DEPENDENCIES file(GET_RUNTIME_DEPENDENCIES): Add undocumented RPATH_PREFIX option 2021-06-04 08:52:01 -04:00
file-RPATH file: Add undocumented RPATH_SET command 2021-06-04 08:52:01 -04:00
FileAPI FileAPI: Add integration for runtime dependency installers 2021-06-04 15:25:18 -04:00
FileAPIExternalSource fileapi: Add a "directory" object to codemodel-v2 2021-03-16 16:47:43 -04:00
find_dependency Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
find_file find_*: Add support for option NO_CACHE 2021-06-02 14:55:00 -04:00
find_library find_*: Add support for option NO_CACHE 2021-06-02 14:55:00 -04:00
find_package WriteBasicConfigVersion supports version strings such as 21.07.04 2021-05-27 15:18:37 -04:00
find_path find_*: Add support for option NO_CACHE 2021-06-02 14:55:00 -04:00
find_program find_*: Add support for option NO_CACHE 2021-06-02 14:55:00 -04:00
FindBoost
FindGTK2
FindLua
FindMatlab
FindOpenGL Add deprecation warnings for policies CMP0072 and below 2020-06-12 11:04:56 -04:00
FindOpenSSL FindOpenSSL: Add support for version-range 2021-02-01 12:27:05 +01:00
FindPkgConfig FindPkgConfig: Always create the imported target 2021-06-04 08:33:27 -04:00
FindSWIG FindSWIG: Fix syntax error 2020-10-02 16:17:36 +02:00
foreach foreach(): loop variables are only available in the loop scope 2021-04-28 19:44:25 +02:00
FPHSA find_package: raise error on empty version range 2020-09-29 13:06:09 +02:00
Framework Framework: Fix $<TARGET_SONAME_FILE:...> for imported frameworks 2021-05-20 15:00:22 -04:00
function
GenerateExportHeader Tests: Fix RunCMake.GenerateExportHeader use of size_t 2021-04-28 09:55:36 -04:00
GeneratorExpression genex: improve unit testing for $<TARGET_NAME_IF_EXISTS:...> 2020-10-24 14:47:47 +02:00
GeneratorInstance
GeneratorPlatform Tests: Make RunCMake.Generator{Platform,Toolset} two-flag cases explicit 2021-03-09 07:35:18 -05:00
GeneratorToolset Xcode: Fix typos and spelling in error message 2021-05-07 17:00:18 +02:00
GenEx-COMPILE_LANG_AND_ID Genex $<COMPILE_LANGUAGE>: Extend contexts supported 2020-07-13 16:27:19 +02:00
GenEx-COMPILE_LANGUAGE Genex $<COMPILE_LANGUAGE>: Extend contexts supported 2020-07-13 16:27:19 +02:00
GenEx-DEVICE_LINK Genex: $<HOST_LINK:> and $<DEVICE_LINK:> must be usable in try_compile 2021-03-31 19:03:35 +02:00
GenEx-GENEX_EVAL Tests: Factor out RunCMake.GenEx-GENEX_EVAL test 2020-06-16 08:03:36 -04:00
GenEx-HOST_LINK Genex: $<HOST_LINK:> and $<DEVICE_LINK:> must be usable in try_compile 2021-03-31 19:03:35 +02:00
GenEx-LINK_LANG_AND_ID Tests: Factor out RunCMake.GenEx-LINK_LANG_AND_ID test 2020-06-16 08:03:35 -04:00
GenEx-LINK_LANGUAGE Tests: Factor out RunCMake.GenEx-LINK_LANGUAGE test 2020-06-16 08:03:35 -04:00
GenEx-TARGET_FILE MSYS: Add support for running under MSYS runtime environment 2021-04-26 14:27:34 -04:00
GenEx-TARGET_RUNTIME_DLLS Genex: Add TARGET_RUNTIME_DLLS genex 2021-02-24 14:55:17 -05:00
get_filename_component get_filename_component: make errors fatal 2020-06-18 10:01:45 -04:00
get_property Add directory property to list imported targets 2021-06-10 15:52:12 -04:00
GetPrerequisites
GNUInstallDirs Tests: Add RunCMake.GNUInstallDirs case for get_absolute_install_dir 2020-11-04 15:10:25 -05:00
GoogleTest Tests: Fix typos and spelling in comments 2021-05-07 17:00:13 +02:00
Graphviz cmTarget: Raise error if imported target location is not set 2020-08-21 08:38:39 -04:00
if cmListFileCache: Enforce proper nesting of flow control statements 2020-10-22 11:40:48 -04:00
IfacePaths cmake: configure preset add support for --install-prefix mapping 2021-03-09 13:53:16 -05:00
include include: refactor call sites of cmMakefile::ReadDependentFile 2020-10-21 11:20:37 +02:00
include_directories
include_external_msproject Tests/include_external_msproject: Check C# project reference 2021-05-13 18:38:01 +02:00
include_guard
IncludeWhatYouUse
IncompatibleQt Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
InitialFlags Restore support for backslashes in initial language-wide flags 2021-04-07 13:53:22 -04:00
install Tests: Add tests for new options 2021-06-04 10:07:38 -04:00
INSTALL_NAME_DIR
InterfaceLibrary Add INTERFACE libraries to generated buildsystem if they have SOURCES 2020-08-07 08:46:32 -04:00
Languages Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
LinkerLauncher Launchers: Support setting linker launchers 2021-05-28 12:28:43 -04:00
LinkStatic
LinkWhatYouUse
list list(REMOVE_ITEM): Make removal of an empty item a no-op. 2021-01-12 08:27:40 +01:00
load_cache
MacOSVersions macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSION 2020-03-12 21:15:40 +11:00
Make Makefiles: Add support of DEPFILE for add_custom_command 2020-12-23 15:47:46 +01:00
math LexerParser: Regenerate parser files with GNU Bison 3.7.4 2021-01-25 12:06:17 -05:00
MaxRecursionDepth
message Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
MetaCompileFeatures
MSVCRuntimeLibrary
MSVCRuntimeTypeInfo MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default 2020-11-13 11:46:23 -05:00
MSVCWarningFlags
MultiLint
Ninja Ninja: Always compile sources using absolute paths 2021-05-25 10:48:26 -04:00
NinjaMultiConfig Merge topic 'ninja-multi-long-command-line-config' 2021-05-03 10:53:50 -04:00
no_install_prefix Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
ObjectLibrary Merge topic 'autogen-clear-early-source-cache' 2021-04-21 10:42:17 -04:00
ObsoleteQtMacros Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
option Add deprecation warnings for policies CMP0081 and below 2021-02-10 09:25:32 -05:00
ParseImplicitData CMakeParseImplicitLinkInfo: Honor GNU static runtime library flags 2021-06-03 08:12:58 -04:00
ParseImplicitIncludeInfo Tests: Extend ParseImplicit*Info with static GNU runtime library flags 2021-06-03 08:12:11 -04:00
ParseImplicitLinkInfo CMakeParseImplicitLinkInfo: Honor GNU static runtime library flags 2021-06-03 08:12:58 -04:00
Policy cmake_policy: Implement test cases for cmake_policy VERSION 2020-12-14 04:55:03 +01:00
PolicyScope
PositionIndependentCode Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
PrecompileHeaders VS: Restore support for PCH in CXX but not C within once target 2021-02-19 11:25:29 -05:00
project project: Define variables indicating whether project is top level 2021-03-26 09:35:34 -04:00
project_injected
return
RuntimePath
ScriptMode
separate_arguments cmake_path: remove new command from 3.19 2020-11-03 09:55:35 -05:00
set
set_property set_property: Fix name of TARGET_DIRECTORY option in error messages 2020-07-09 06:33:03 -04:00
SourceProperties Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
string string(JSON): Adds JSON parsing support to the string command 2020-09-16 13:55:24 -04:00
Swift Swift: support Ninja Multi-Config 2020-03-09 09:11:22 -04:00
SymlinkTrees Restore handling of build directory inside a symlinked path 2020-07-02 07:33:16 -04:00
Syntax LexerParser: Regenerate parser files with GNU Bison 3.7.4 2021-01-25 12:06:17 -05:00
target_compile_definitions
target_compile_features
target_compile_options Tests: Add cases verifying flag ordering rules 2021-06-07 13:39:21 -04:00
target_include_directories target_include_directories: Support AFTER option 2020-12-19 14:51:39 +01:00
target_link_directories Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...> 2020-02-26 16:38:42 +01:00
target_link_libraries Add deprecation warnings for policies CMP0081 and below 2021-02-10 09:25:32 -05:00
target_link_libraries-ALIAS ALIAS targets: Non-global aliases must be propagated to sub-directories 2020-07-11 16:59:50 +02:00
target_link_libraries-LINK_LANG_AND_ID Tests: Shorten case names in RunCMake.target_link_libraries-* tests 2020-06-17 08:13:57 -04:00
target_link_libraries-LINK_LANGUAGE Genex: LINK_LANGUAGE respects LINKER_LANGUAGE property 2021-02-23 08:14:14 -05:00
target_link_options CUDA Device link: Ensure all link options are correctly formatted 2021-03-31 12:05:23 +02:00
target_sources
TargetObjects Genex: Fix grammatical error in TARGET_OBJECTS error message 2021-02-24 14:55:17 -05:00
TargetPolicies Compile with explicit language flag when source LANGUAGE property is set 2020-12-02 11:39:11 -05:00
TargetProperties Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
TargetPropertyGeneratorExpressions Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
TargetSources target_sources: Support custom targets 2020-10-24 21:13:25 +02:00
test_include_dirs
ToolchainFile CompilerId/Features: Tolerate variables named for languages 2021-05-03 10:22:23 -04:00
TransformDepfile Tests: Remove unused RunCMake.TransformDepfile files 2021-06-08 13:10:02 -04:00
try_compile Tests: Update for upstream ninja change to write status on stderr 2021-02-23 10:55:12 -05:00
try_run try_run: Allow to set working directory 2021-02-03 08:42:05 +01:00
UnityBuild Unity: Generate reproducible unity IDs for anonymous namespaces 2021-01-23 07:14:05 +11:00
UseSWIG UseSWIG: Use standard library name conventions for csharp language 2021-03-26 16:27:18 +01:00
variable_watch Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
VisibilityPreset
VS10Project VS: Fix CSharp sources inside build directory 2021-05-03 11:25:42 -04:00
VS10ProjectWinCE
VSSolution Tests/RunCMake: Update cmake_minimum_required versions 2020-06-18 09:52:05 -04:00
while cmListFileCache: Enforce proper nesting of flow control statements 2020-10-22 11:40:48 -04:00
Win32GenEx WIN32_EXECUTABLE: Add support for generator expressions 2020-08-21 09:17:27 -04:00
WorkingDirectory
WriteBasicConfigVersionFile WriteBasicConfigVersion supports version strings such as 21.07.04 2021-05-27 15:18:37 -04:00
WriteCompilerDetectionHeader WriteCompilerDetectionHeader: Add policy to remove module 2020-12-05 21:57:08 +11:00
XcodeProject Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute. 2021-05-05 14:38:33 +01:00
XcodeProject-Embed Xcode: Add support for embedding app extensions 2021-04-22 15:17:02 +10:00
CMakeLists.txt Merge topic 'presets-build-fixes' 2021-06-09 07:57:34 -04:00
color_warning.c
exit_code.c clang-tidy: address readability-else-after-return lint 2020-04-13 11:26:03 -04:00
fake_build_command.c ctest: report make-level errors to CDash when using launchers 2020-09-28 13:13:52 -04:00
FileAPIDummyFile.cmake
print_stdin.c
pseudo_cppcheck.c clang-tidy: address readability-else-after-return lint 2020-04-13 11:26:03 -04:00
pseudo_cpplint.c
pseudo_emulator_custom_command_arg.c
pseudo_emulator_custom_command.c
pseudo_emulator.c
pseudo_iwyu.c
pseudo_llvm-rc.c llvm_rc: add llvm_rc option filter to correctly pick up all options 2020-10-28 07:19:31 -04:00
pseudo_tidy.c
README.rst
RunCMake.cmake MSYS: Add support for running under MSYS runtime environment 2021-04-26 14:27:34 -04:00
RunCTest.cmake Tests: Add RunCTest helper option to control CTest verbose flag 2021-04-06 12:42:41 -04:00

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.

   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 ``<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``
    Regex matching expected process result, 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 when a specific platform expects differing stdout or stderr that
  can be done by adding a platform specific output file. These follow the
  naming convention of:
   ``<SubTest>-stdout-<platform_lower_case>.txt``
   ``<SubTest>-stderr-<platform_lower_case>.txt``

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

To speed up local testing, you can choose to run only a subset of
``run_cmake()`` tests in a ``RunCMakeTest.cmake`` script by using the
``RunCMake_TEST_FILTER`` environment variable. If this variable is set,
it is treated as a regular expression, and any tests whose names don't
match the regular expression are not run. For example::

  $ RunCMake_TEST_FILTER="^example" ctest -R '^RunCMake\.Example$'

This will only run subtests in ``RunCMake.Example`` that start with
``example``.