CMake/Tests/RunCMake
Brad King edba4bf64c Merge topic 'patch-TEST_INCLUDE_FILE'
1fa89aa3e4 TEST_INCLUDE_FILE: Replace with TEST_INCLUDE_FILES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10514
2025-03-25 10:52:40 -04:00
..
ABI
add_compile_definitions
add_custom_command CMP0050: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
add_custom_target CMP0037: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
add_dependencies add_dependencies: Allow calling with no dependencies 2025-02-24 13:56:31 -05:00
add_executable Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
add_library Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
add_link_options
add_subdirectory Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
add_test Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR 2024-01-29 10:30:24 -05:00
alias_targets CMP0037: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Android Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
AndroidMK Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
AndroidTestUtilities Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
AppleSilicon
AppleTextStubs CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
ARCHIVER-prefix Renumber post-3.31 development from 3.32 to 4.0 2025-01-16 09:18:21 -05:00
AutoExportDll Revise C++ coding style using clang-format-18 2025-01-23 11:43:06 -05:00
Autogen_1 Autogen: Fix missing autogen dependencies if a target is linked twice 2025-02-13 14:33:41 -05:00
Autogen_2 Autogen: Separate RunCMake.AutogenQtX tests 2024-06-24 15:00:51 +02:00
Autogen_3 Autogen: Separate RunCMake.AutogenQtX tests 2024-06-24 15:00:51 +02:00
Autogen_4 Autogen: Separate RunCMake.AutogenQtX tests 2024-06-24 15:00:51 +02:00
Autogen_5 Autogen: Revert "Add timestamp file for CMAKE_GLOBAL_AUTORCC_TARGET" 2024-07-10 15:22:02 +02:00
Autogen_6 Autogen: Revert adding ui files to byproducts of the timestamp target 2024-12-04 12:37:13 +01:00
Autogen_common Remove optional arguments from else() and end*() commands 2025-01-28 03:01:23 +01:00
block Add deprecation warnings for policies CMP0139 and below 2024-10-10 09:31:52 -04:00
build_command CMP0061: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
BuildDepends Merge topic 'custom_command-depfile-management' 2024-10-28 09:30:26 -04:00
BuiltinTargets
BundleUtilities
Byproducts
CacheNewline Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CheckCompilerFlag Merge branch 'backport-3.28-ci-xcode-15.3' 2024-03-12 09:49:17 -04:00
CheckIPOSupported Add deprecation warnings for policies CMP0139 and below 2024-10-10 09:31:52 -04:00
CheckLinkerFlag
CheckModules Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CheckSourceCompiles Tests: With lfortran < 1.24 skip cases broken by incorrect filename handling 2024-01-08 15:25:57 -05:00
CheckSourceRuns Tests: With lfortran < 1.24 skip cases broken by incorrect filename handling 2024-01-08 15:25:57 -05:00
ClangTidy Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
cmake_host_system_information Fix: A lot of typos in code found by typos 2025-01-12 18:49:34 +04:00
cmake_language CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
cmake_minimum_required Add CMAKE_POLICY_VERSION_MINIMUM environment variable 2025-02-20 16:55:53 -05:00
CMAKE_MSVCIDE_RUN_PATH
cmake_parse_arguments cmake_parse_arguments: Restore capture of value after repeated keyword 2024-10-28 09:47:21 -04:00
cmake_path Tests: Replace accidental empty elseif() with else() 2024-11-13 15:31:12 -05:00
cmake_pkg_config PkgC: Add NAME and PREFIX 2025-03-14 15:17:27 -04:00
CMakeDependentOption Add deprecation warnings for policies CMP0128 and below 2024-02-06 17:07:09 -05:00
CMakeListFileName Tests: Forward tested CMake generator to more cases 2025-01-15 08:21:31 -05:00
CMakePackage codespell: Fix typos found by version 2.4 2025-01-27 10:55:58 -05:00
CMakePresets cmJSONState: Use StructuredErrors when available 2025-03-17 14:17:34 -04:00
CMakePresetsBuild
CMakePresetsPackage Tests: Forward tested CMake generator to more cases 2025-01-15 08:21:31 -05:00
CMakePresetsTest
CMakePresetsWorkflow preset: Easier command line interface for Workflow Presets 2024-10-05 16:08:44 +10:00
CMakeRelease ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries 2025-02-27 16:35:09 -05:00
CMakeRoleGlobalProperty CTest: Remove declarative scripting mode 2024-10-09 22:30:58 +02:00
CMP0004 CMP0004: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
CMP0019 CMP0019: Remove support for OLD behavior 2025-01-18 09:51:44 -05:00
CMP0022 CMP0042: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
CMP0026 CMP0026: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
CMP0027 CMP0027: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
CMP0037 CMP0037: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
CMP0038 CMP0038: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
CMP0039 CMP0039: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
CMP0040 CMP0040: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
CMP0041 CMP0041: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
CMP0042 CMP0042: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
CMP0045 CMP0045: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
CMP0046 CMP0046: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
CMP0049 CMP0049: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
CMP0051 CMP0051: Remove support for OLD behavior 2025-01-20 09:46:54 -05:00
CMP0053 CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
CMP0054 CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
CMP0055 CMP0055: Remove support for OLD behavior 2025-01-21 09:44:05 -05:00
CMP0057 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
CMP0059 CMP0059: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
CMP0060 CMP0060: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
CMP0064 CMP0064: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
CMP0065 CMP0065: Remove support for OLD behavior 2025-01-22 10:40:55 -05:00
CMP0068 CMP0042: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
CMP0069 Deprecate compatibility with CMake versions older than 3.10 2024-10-03 14:18:26 -04:00
CMP0081
CMP0102
CMP0104
CMP0106
CMP0111
CMP0115
CMP0116
CMP0118 CMP0118: Revise documentation to describe actual behavior 2024-03-21 11:37:46 -04:00
CMP0119
CMP0121
CMP0125
CMP0126
CMP0129 Add deprecation warnings for policies CMP0129 and below 2024-06-05 13:19:07 -04:00
CMP0132 Add deprecation warnings for policies CMP0139 and below 2024-10-10 09:31:52 -04:00
CMP0135 Add deprecation warnings for policies CMP0139 and below 2024-10-10 09:31:52 -04:00
CMP0139 Add deprecation warnings for policies CMP0139 and below 2024-10-10 09:31:52 -04:00
CMP0150
CMP0152
CMP0153
CMP0156 Revert "Ensure imported targets in sibling dirs are deduplicated" 2024-10-16 16:49:27 -04:00
CMP0160 cmTarget: Don't allow setting read-only properties 2024-01-23 08:50:38 -05:00
CMP0163 CMP0163: Make GENERATED source file property globally visible 2024-03-29 08:54:11 -04:00
CMP0165 enable_language(): Fail if called before project() 2024-04-02 23:00:38 +11:00
CMP0169 FetchContent: Deprecate FetchContent_Populate(depName) 2024-05-29 18:52:24 +10:00
CMP0170 FetchContent: Enforce FETCHCONTENT_FULLY_DISCONNECTED requirements 2024-05-29 20:39:17 +10:00
CMP0171 add_custom_command: Add CODEGEN support 2024-07-01 12:02:49 -04:00
CMP0173 CMakeFindFrameworks: Deprecate the module subject to policy CMP0173 2024-08-16 11:10:27 +10:00
CMP0187 Include source file without an extension after the same name with an extension 2025-02-14 10:01:10 -05:00
Codegen Ninja: Add missing top-level codegen dependencies on per-directory codegen 2024-12-10 11:46:31 -05:00
Color
CommandLine cmake: Friendlier message when trying to --build the wrong dir 2025-02-07 10:56:05 -05:00
CommandLineTar Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompatibleInterface Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompileDefinitions Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompileFeatures CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
CompilerArgs Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompilerChange Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompilerId NVCC: Detect host compiler id and version 2024-09-20 17:48:33 -04:00
CompilerLauncher Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompilerNotFound Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CompilerTest
CompileWarningAsError
ConfigDir instrumentation: Collect and record project build system metrics 2025-01-15 09:16:50 -05:00
Configure Ninja: Fix regression with a large number of subdirectories 2025-03-04 13:37:01 -05:00
configure_file Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
continue Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CPack CPack/RPM: Add support for all weak dependency tags 2025-03-03 09:09:15 -05:00
CPack_NuGet Tests(NuGet): Fix the test to ignore empty and space-only lines 2025-01-06 04:16:32 +04:00
CPack_WIX Remove unnecessary executable permission from .ps1 scripts 2024-04-30 09:33:44 -04:00
CPackCommandLine CPack: Allow source-relative CPACK_PROJECT_CONFIG_FILE 2025-03-12 20:37:01 +05:00
CPackConfig Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CPackInstallProperties Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CPackSymlinks
Cppcheck Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
Cpplint Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CpsExportImportBuild export: Add build-tree CPS support 2025-02-25 15:42:23 -05:00
CpsExportImportInstall Tests: Rename certain CPS tests 2025-02-25 12:18:13 -05:00
CrosscompilingEmulator Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
CSharpCustomCommand Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CSharpReferenceImport Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CTest TEST_INCLUDE_FILE: Replace with TEST_INCLUDE_FILES 2025-03-24 14:20:27 +01:00
ctest_build CMP0061: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
ctest_cmake_error Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_configure Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_coverage Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_disabled_test Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_empty_binary_directory Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_environment Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_exit CTest: Allow setting exit code in ctest scripts 2025-03-20 16:31:49 +01:00
ctest_fixtures Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_instrumentation ctest: Include cmake instrumentation data in XML files 2025-02-15 06:25:12 -05:00
ctest_labels_for_subprojects instrumentation: Fix expected location of Labels when using CTest launchers 2025-02-03 09:08:44 -05:00
ctest_memcheck Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_skipped_test Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_start Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_submit cmCTest*Command: Fortify argument parsing 2024-11-05 10:20:12 +01:00
ctest_test Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_update Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ctest_upload Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CTestCommandExpandLists
CTestCommandLine ctest: Add option to specify the --schedule-random seed 2025-03-18 14:17:59 -04:00
CTestResourceAllocation cmJSONState: Use StructuredErrors when available 2025-03-17 14:17:34 -04:00
CTestTimeout Tests/RunCMake/CTestTimeout: Improve reliability when running on busy hosts 2024-11-04 16:43:59 -05:00
CTestTimeoutAfterMatch Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
CUDA_architectures
CXXModules cmExperimental: recycle build database uuid 2025-03-03 22:03:27 +01:00
define_property Tests: Add unit tests for property redefinition 2024-01-29 05:23:37 -05:00
DependencyGraph Tests/RunCMake: Pass Fortran compiler id into more tests 2024-07-22 15:55:42 -04:00
DependencyProviders
Diab Diab: Add tests covering the Diab toolchains 2025-03-18 13:18:55 -04:00
DisallowedCommands CMP0036: Remove support for OLD build_name command 2025-01-19 09:41:01 -05:00
ExcludeFromAll Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
execute_process execute_process: Improve invocation of .cmd/.bat with spaces 2025-02-10 19:44:19 -05:00
export export: Allow compatible build-tree exports 2025-02-24 14:54:50 -05:00
ExportCompileCommands
ExportImport
ExportPackageInfo export: Add build-tree CPS support 2025-02-25 15:42:23 -05:00
ExportWithoutLanguage Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ExternalData Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ExternalProject ExternalProject: Optionally integrate 'make' job server with INSTALL_COMMAND 2024-11-19 10:22:24 -05:00
ExtraGenerators Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
FeatureSummary FeatureSummary: Introduce policy CMP0183 for full Condition Syntax 2024-11-26 13:19:25 -05:00
FetchContent codespell: Fix typos found by version 2.4 2025-01-27 10:55:58 -05:00
FetchContent_find_package FetchContent: Deprecate FetchContent_Populate(depName) 2024-05-29 18:52:24 +10:00
file CMP0009: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
File_Archive Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
File_Configure
File_Generate Clarify advice given by compatibility deprecation message for CMake < 3.10 2024-11-14 09:40:01 -05:00
file-CHMOD Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
file-DOWNLOAD file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by default 2024-09-26 10:10:20 -04:00
file-GET_RUNTIME_DEPENDENCIES file(GET_RUNTIME_DEPENDENCIES): Fix resolution of repeated ELF dependencies 2024-08-19 08:57:04 +03:00
file-MAKE_DIRECTORY file(MAKE_DIRECTORY): Clarify formatting of unexpected arguments error 2025-03-13 11:57:27 -04:00
file-RPATH install: Restore SETUID/SETGID after RPATH change 2024-12-19 08:29:44 -05:00
file-STRINGS file: STRINGS + REGEX store match results 2024-01-09 16:36:55 -05:00
FileAPI fileapi: Restrict reply object file path lengths 2025-01-27 09:49:19 +01:00
FileAPIExternalSource
find_dependency Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
find_file find_*: Add variable to default calls to REQUIRED 2025-02-27 10:51:07 -05:00
find_library find_*: Add variable to default calls to REQUIRED 2025-02-27 10:51:07 -05:00
find_package find_*: Add variable to default calls to REQUIRED 2025-02-27 10:51:07 -05:00
find_package-CPS find_package: CPS component requirements != CMake components 2025-03-05 14:47:49 -05:00
find_path find_*: Add variable to default calls to REQUIRED 2025-02-27 10:51:07 -05:00
find_program find_*: Add variable to default calls to REQUIRED 2025-02-27 10:51:07 -05:00
FindBoost Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
FindGTK2 Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
FindLua Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
FindMatlab Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
FindOpenGL FindOpenGL: Add support for a separate GLU include directory 2024-02-05 14:06:06 -05:00
FindOpenSSL
FindPkgConfig kFreeBSD: Remove support for obsolete platform 2025-03-05 11:57:49 -05:00
FindPython FindPython: enforce artifacts consistency when cross-compiling 2025-03-05 17:11:56 +01:00
FindSWIG
foreach
FPHSA FPHSA: Consistent quoting in reported messages 2024-11-26 23:40:01 +04:00
Framework Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
function CMP0007: Remove support for OLD behavior 2025-01-17 09:28:36 -05:00
GenerateExportHeader Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
GeneratorExpression CMP0044: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
GeneratorExpressionShortCircuit
GeneratorInstance Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
GeneratorPlatform Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
GeneratorToolset Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
GenEx-COMPILE_LANG_AND_ID
GenEx-COMPILE_LANGUAGE Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
GenEx-DEVICE_LINK
GenEx-GENEX_EVAL
GenEx-HOST_LINK
GenEx-LINK_GROUP
GenEx-LINK_LANG_AND_ID
GenEx-LINK_LANGUAGE
GenEx-LINK_LIBRARY Link feature attributes: stabilization 2024-06-21 11:18:20 +02:00
GenEx-LIST regex: Match ^ at most once in repeated searches 2025-02-13 20:00:02 +05:00
GenEx-PATH GenEx $<PATH>: Add NATIVE_PATH sub-command. 2024-12-14 11:16:47 +01:00
GenEx-PATH_EQUAL
GenEx-TARGET_FILE GenEx: Add support for PDB_NAME and COMPILE_PDB_NAME 2025-03-11 10:28:12 -04:00
GenEx-TARGET_IMPORT_FILE CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
GenEx-TARGET_PROPERTY CMP0026: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
GenEx-TARGET_RUNTIME_DLLS Revise C++ coding style using clang-format-18 2025-01-23 11:43:06 -05:00
get_filename_component get_filename_component: Fix REALPATH for .. after symlink 2024-11-26 06:17:15 -05:00
get_property Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
GetPrerequisites Fix: A lot of typos in code found by typos 2025-01-12 18:49:34 +04:00
GNUInstallDirs Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
GoogleTest Merge topic 'GoogleTest-variable-expansion' 2025-01-28 08:42:28 -05:00
Graphviz Tests: switch off some RunCMake tests for broken libc on e2k 2025-01-17 07:37:23 +03:00
IAR Tests/RunCMake/IAR: Fix ASM cases for XLINK targets 2024-09-06 11:25:13 -04:00
if Tests/RunCMake/if: Optionally skip checking write-only directory permissions 2025-03-12 16:58:46 -04:00
IfacePaths CMP0052: Remove support for OLD behavior 2025-01-20 09:46:54 -05:00
include FindGCCXML: Add policy to remove this module 2025-02-17 11:35:25 -05:00
include_directories CMP0023: Remove support for OLD behavior 2025-01-18 09:51:45 -05:00
include_external_msproject Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
include_guard Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
IncludeWhatYouUse Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
IncompatibleQt Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
InitialFlags
install CMP0062: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
INSTALL_NAME_DIR
InstallPackageInfo Merge branch 'backport-export-multiple-set-not-installed' 2025-03-17 18:04:53 -04:00
InstallParallel cmake --install: Respect CMAKE_DEFAULT_CONFIGS 2024-11-19 11:37:47 -05:00
Instrumentation Merge topic 'instrumentation-snippet-names' 2025-03-19 09:05:56 -04:00
InterfaceLibrary CMP0037: Remove support for OLD behavior 2025-01-19 09:41:01 -05:00
Languages Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
LanguageStandards Add CMAKE_<LANG>_STANDARD_LATEST variables 2024-04-30 11:05:03 -04:00
LinkerLauncher
LinkerSelection Linker configuration: rely now on CMAKE_<LANG>_LINK_MODE variable. 2025-01-26 14:45:21 +01:00
LinkItemValidation CMP0028: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
LinkLibrariesProcessing Libraries processing: update configuration wording 2024-06-21 11:18:12 +02:00
LinkLibrariesStrategy LLD linker: avoid regression on archive libraries deduplication 2024-11-18 21:02:50 +01:00
LinkStatic Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
LinkWarningAsError Merge topic 'renumber-to-4.0' 2025-01-17 08:56:31 -05:00
LinkWhatYouUse Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
list regex: Match ^ at most once in repeated searches 2025-02-13 20:00:02 +05:00
load_cache Fix: A lot of typos in code found by typos 2025-01-12 18:49:34 +04:00
MacOSVersions
Make Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
math Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
MaxRecursionDepth CTest: Remove declarative scripting mode 2024-10-09 22:30:58 +02:00
message Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
MetaCompileFeatures
MSVCDebugInformationFormat Add deprecation warnings for policies CMP0142 and below 2025-02-05 14:20:48 -05:00
MSVCRuntimeChecks MSVC: Add abstraction for runtime checks 2025-01-29 13:07:41 -05:00
MSVCRuntimeLibrary
MSVCRuntimeTypeInfo
MSVCWarningFlags
MultiLint Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
Ninja Ninja: Add COMMENT to custom command and target descriptions 2025-03-03 11:58:21 -05:00
NinjaMultiConfig EXPORT_COMPILE_COMMANDS: Write absolute posix paths to compile_commands.json 2025-02-18 16:03:15 -05:00
NinjaPrivateDeps
no_install_prefix Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
ObjectLibrary CMP0022: Remove support for OLD behavior 2025-01-18 09:51:45 -05:00
ObsoleteQtMacros Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
option
ParseImplicitData Merge topic 'test-implicit-link-info' 2025-02-21 09:08:22 -05:00
ParseImplicitIncludeInfo Cray: Enable Cray linker wrapper detection 2025-02-14 12:54:25 -06:00
ParseImplicitLinkInfo Merge topic 'link-information-with-decorated-diagnostics' 2025-03-11 09:40:28 -04:00
Policy Tests/RunCMake: Update more cmake_minimum_required versions to 3.10 2025-01-15 11:21:21 -05:00
PolicyScope CMP0044: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
PositionIndependentCode Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
PrecompileHeaders Add deprecation warnings for policies CMP0142 and below 2025-02-05 14:20:48 -05:00
PrintHelpers
project CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
project_injected CMP0048: Remove support for OLD behavior 2025-01-19 09:41:03 -05:00
property_init Xcode: Support for test action 'Build Configuration' scheme property 2025-01-09 16:36:33 +00:00
return Add deprecation warnings for policies CMP0142 and below 2025-02-05 14:20:48 -05:00
RunCPack LICENSE: Replace references to Copyright.txt with LICENSE.rst 2025-03-03 10:43:35 -05:00
RuntimePath Tests/RunCMake/RuntimePath: Fix Stub case for musl C library 2025-01-08 12:04:18 -05:00
SarifOutput cmake: Add SARIF diagnostics output support 2025-01-29 08:43:19 -05:00
ScriptMode
separate_arguments Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
set Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
set_property Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
set_tests_properties
SourceProperties Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
StandardLinkDirectories Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES 2024-08-28 15:54:43 -04:00
string Tests: Skip string(TIMESTAMP) 2038 case on parisc 32-bit time_t 2025-03-01 14:24:13 -05:00
Swift EXPORT_COMPILE_COMMANDS: Write absolute posix paths to compile_commands.json 2025-02-18 16:03:15 -05:00
SymlinkTrees SymlinkTrees: Test building in one directory when CWD is a symlink to it 2025-01-15 16:15:27 -05:00
Syntax CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
target_compile_definitions
target_compile_features Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
target_compile_options
target_include_directories
target_link_directories
target_link_libraries CMP0042: Remove support for OLD behavior 2025-01-19 09:41:02 -05:00
target_link_libraries-ALIAS Tests: Explicitly disable AIX_SHARED_LIBRARY_ARCHIVE in some cases 2024-11-23 15:23:25 -05:00
target_link_libraries-LINK_GROUP CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
target_link_libraries-LINK_LANG_AND_ID Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
target_link_libraries-LINK_LANGUAGE Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
target_link_libraries-LINK_LIBRARY CMP0054: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
target_link_libraries-LINKER-prefix Renumber post-3.31 development from 3.32 to 4.0 2025-01-16 09:18:21 -05:00
target_link_options LINK_OPTIONS: Fix crash on empty LINKER: prefix 2024-12-04 10:16:56 -05:00
target_sources CMP0026: Remove support for OLD behavior 2025-01-19 09:40:59 -05:00
TargetArtifacts
TargetObjects Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
TargetPolicies AIX: Enable shared library archives by default 2024-11-23 15:23:25 -05:00
TargetProperties Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
test_include_dirs Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
TIClang TIClang: Add support for TI Clang-based compilers, including tiarmclang 2024-02-09 15:54:40 -05:00
ToolchainFile Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
TransformDepfile
try_compile Linker configuration: rely now on CMAKE_<LANG>_LINK_MODE variable. 2025-01-26 14:45:21 +01:00
try_run Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
UnityBuild Unity: Add option to use relative paths for unity files 2024-10-15 09:44:18 -07:00
UseSWIG
variable_watch Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
VerifyHeaderSets Revise C++ coding style using clang-format-18 2025-01-23 11:43:06 -05:00
VisibilityPreset CMP0063: Remove support for OLD behavior 2025-01-22 10:40:54 -05:00
VS10Project VS: Set the linker image version using the target's VERSION property 2025-02-11 17:36:34 +05:00
VS10ProjectUseDebugLibraries VS: Add UseDebugLibraries to vcxproj files by default 2024-02-22 08:43:16 -05:00
VsDotnetSdk CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
VsNugetPackageRestore CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
VSSolution Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
while Add deprecation warnings for policies CMP0139 and below 2024-10-10 09:31:52 -04:00
Win32GenEx
WorkingDirectory cmWorkingDirectory: Unify error messages 2024-10-18 15:04:07 -04:00
WriteBasicConfigVersionFile
WriteCompilerDetectionHeader Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
XcFramework Tests/RunCMake/XcFramework: Use macosx SDK in all multi-arch macOS cases 2024-11-07 09:46:09 -05:00
XcodeProject Xcode: Fix POST_BUILD order in bundle targets on Xcode 16+ 2025-02-25 08:15:12 -05:00
XcodeProject-Device Tests/RunCMake: Update cmake_minimum_required versions to 3.10 2024-10-03 11:52:22 -04:00
XcodeProject-Embed Xcode: Fix XCODE_EMBED_FRAMEWORKS when settings differ across targets 2024-12-06 09:22:07 -05:00
AddRunCMakeTest.cmake
CMakeLists.txt Merge topic 'ctest-exit' 2025-03-24 10:22:18 -04:00
color_warning.c
detect_jobserver.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
exit_code.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
exit_crash.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
fake_build_command.c
FileAPIDummyFile.cmake
print_stdin.c
pseudo_cppcheck.c
pseudo_cpplint.c
pseudo_emulator_custom_command_arg.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
pseudo_emulator_custom_command.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
pseudo_emulator.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
pseudo_iwyu.c
pseudo_llvm-rc.c Tests: Fix FILE stream leaks in helper programs 2024-10-26 05:47:19 -04:00
pseudo_tidy.c
README.rst Help/dev: Add a CMake Testing Guide 2024-06-05 12:58:47 -04:00
RunCMake.cmake LICENSE: Replace references to Copyright.txt with LICENSE.rst 2025-03-03 10:43:35 -05:00
RunCPack.cmake LICENSE: Replace references to Copyright.txt with LICENSE.rst 2025-03-03 10:43:35 -05:00
RunCTest.cmake LICENSE: Replace references to Copyright.txt with LICENSE.rst 2025-03-03 10:43:35 -05:00
showIncludes.c Revise C++ coding style using clang-format with "east const" 2025-01-23 13:09:50 -05:00
testStartupInfo.c Tests/RunCMake/execute_process: Check STARTUPINFOW reserved members 2024-05-24 10:12:27 -04:00

CMake Tests/RunCMake Directory
******************************

This directory contains tests that run CMake and/or other tools while
precisely checking their return code and stdout/stderr content.
The RunCMake infrastructure is useful for testing error cases and
diagnostic output.

See also `../README.rst`_, the `CMake Testing Guide`_,
and the `CMake Source Code Guide`_.

.. _`../README.rst`: ../README.rst
.. _`CMake Testing Guide`: ../../Help/dev/testing.rst
.. _`CMake Source Code Guide`: ../../Help/dev/source.rst
.. _`CMakeLists.txt`: CMakeLists.txt

Adding a Test
=============

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(Case1)
    ...
    run_cmake(CaseN)

   where ``Case1`` through ``CaseN`` are case names each corresponding to
   an independent CMake run and project configuration.

   One may also add calls of the form::

    run_cmake_command(CaseI ${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(Case1)
    ...
    run_ctest(CaseN)

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

   Alternatively, if the test is to cover running ``cpack -G`` then use::

    include(RunCPack)
    run_cpack(Sample1)
    ...
    run_cpack(SampleN)

   where ``Sample1`` through ``SampleN`` are sample project directories
   in the ``RunCPack/`` directory adjacent to this file.

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

5. Create a ``<Test>/<case>.cmake`` file for each case named
   above containing the actual test code.  Optionally create files
   containing expected test results:

   ``<case>-result.txt``
    Regex matching expected process result, if not ``0``
   ``<case>-stdout.txt``
    Regex matching expected stdout content
   ``<case>-stderr.txt``
    Regex matching expected stderr content, if not ``^$``
   ``<case>-check.cmake``
    Custom result check.

   To specify platform-specific matches, create files of the form
   ``<case>-{stdout,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 ``<case>-check.cmake`` may use the `RunCMake Variables`_.
   On failure the script must store a message in ``RunCMake_TEST_FAILED``.
   The check script may optionally set ``RunCMake_TEST_FAILURE_MESSAGE``
   with additional text to be included in the message if the test fails.

RunCMake Commands
=================

A ``RunCMakeTest.cmake`` script, after ``include(RunCMake)``, may use
the following commands.

``run_cmake(<case>)``
  Run CMake or another command and check expected results described by
  ``<case>-{result,stdout,stderr}.txt`` and ``<case>-check.cmake``.
  The command is executed by a call of the form::

    execute_process(
      COMMAND ${RunCMake_TEST_COMMAND} ${RunCMake_TEST_OPTIONS}
      WORKING_DIRECTORY "${RunCMake_TEST_COMMAND_WORKING_DIRECTORY}"
      [TIMEOUT "${RunCMake_TEST_TIMEOUT}"]
      ...
      )

  Behavior may be customized by setting `RunCMake Variables`_ before
  the call.

``run_cmake_command(<case> <command> <args>...)``
  Sets ``RunCMake_TEST_COMMAND`` to ``<command>;<args>...``
  and calls ``run_cmake(<case>)``.

  This is useful to run an arbitrary command.

``run_cmake_script(<case> <args>...)``
  Sets ``RunCMake_TEST_COMMAND`` to
  ``${CMAKE_COMMAND};<args>...;-P;${RunCMake_SOURCE_DIR}/<case>.cmake``
  and calls ``run_cmake(<case>)``.

  This is useful to run CMake in script mode without configuring a project.

``run_cmake_with_options(<case> <opts>...)``
  Sets ``RunCMake_TEST_OPTIONS`` to ``<opts>...``
  and calls ``run_cmake(<case>)``.

``run_cmake_with_raw_args(<case> "<args>")``
  Calls ``run_cmake(<case>)`` with the underlying ``execute_process()``
  call extended with the content of ``<args>`` treated as literal source
  code of CMake language command arguments::

    execute_process(
      COMMAND ${RunCMake_TEST_COMMAND} ${RunCMake_TEST_OPTIONS} <args>
      ...
      )

  This is useful to pass arguments to the test command that cannot be
  encoded in CMake language ``;``-separated lists.

RunCMake Variables
==================

The behavior of `RunCMake Commands`_ such as ``run_cmake()`` may be
customized by setting the following variables before a call.

``RunCMake_GENERATOR``
  CMake generator to use when configuring projects.
  This provided to ``RunCMakeTest.cmake`` scripts automatically
  when they are executed, based on the CMake generator used to
  configure the test suite.

  For some generators, additional variables are also provided:

  ``RunCMake_GENERATOR_PLATFORM``
    Specifies the ``CMAKE_GENERATOR_PLATFORM``.

  ``RunCMake_GENERATOR_TOOLSET``
    Specifies the ``CMAKE_GENERATOR_TOOLSET``.

  ``RunCMake_GENERATOR_INSTANCE``
    Specifies the ``CMAKE_GENERATOR_INSTANCE``.

``RunCMake_GENERATOR_IS_MULTI_CONFIG``
  Boolean value indicating whether ``${RunCMake_GENERATOR}`` is a
  multi-config generator.
  This provided to ``RunCMakeTest.cmake`` scripts automatically
  when they are executed, based on the CMake generator used to
  configure the test suite.

``RunCMake_SOURCE_DIR``
  Absolute path to the ``Tests/RunCMake/<Test>`` directory in
  the CMake source tree.  This provided to ``RunCMakeTest.cmake``
  scripts automatically when they are executed.

``RunCMake_BINARY_DIR``
  Absolute path to the ``Tests/RunCMake/<Test>`` directory in
  the CMake binary tree.  This provided to ``RunCMakeTest.cmake``
  scripts automatically when they are executed.

``RunCMake_TEST_SOURCE_DIR``
  Absolute path to the individual test case's source tree.
  If not set, defaults to ``${RunCMake_SOURCE_DIR}``.

``RunCMake_TEST_BINARY_DIR``
  Absolute path to the individual test case's binary tree.
  If not set, defaults to ``${RunCMake_BINARY_DIR}/<case>-build``.

``RunCMake_TEST_NO_CLEAN``
  Boolean value indicating whether ``run_cmake(<case>)`` should remove the
  ``${RunCMake_TEST_BINARY_DIR}`` directory before running the test case.
  If not set, or if set to a false value, the directory is removed.

  This is useful to run `Multi-Step Test Cases`_.

``RunCMake_TEST_COMMAND``
  The command for ``run_cmake(<case>)`` to execute.
  If not set, defaults to running CMake to generate a project::

    ${CMAKE_COMMAND} ${RunCMake_TEST_SOURCE_DIR} \
      -G ${RunCMake_GENERATOR} ... -DRunCMake_TEST=<case>

``RunCMake_TEST_COMMAND_WORKING_DIRECTORY``
  The working directory in which ``run_cmake(<case>)`` to execute its command.
  If not set, defaults to ``${RunCMake_TEST_BINARY_DIR}``.

``RunCMake_TEST_OPTIONS``
  Additional command-line options for ``run_cmake(<case>)`` to pass to
  CMake when configuring a project with a default ``RunCMake_TEST_COMMAND``.
  If not set, defaults to empty.
  If ``RunCMake_TEST_COMMAND`` is set, ``RunCMake_TEST_OPTIONS`` is forced
  to empty.

``RunCMake_TEST_OUTPUT_MERGE``
  Boolean value indicating whether ``run_cmake(<case>)`` should redirect
  the test process's ``stderr`` into its ``stdout``.

``RunCMake_TEST_TIMEOUT``
  Specify a timeout, in seconds, for ``run_cmake(<case>)`` to pass to its
  underlying ``execute_process()`` call using the ``TIMEOUT`` option.

Multi-Step Test Cases
=====================

Normally each ``run_cmake(<case>)`` call corresponds to one standalone
test case with its own build tree.  However, some test cases may require
multiple steps to be performed in a single build tree.  This can be
achieved as follows::

  block()
    set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/example-build)
    run_cmake(example)
    set(RunCMake_TEST_NO_CLEAN 1)
    set(RunCMake_TEST_OUTPUT_MERGE 1)
    run_cmake_command(example-build ${CMAKE_COMMAND} --build . --config Debug)
  endblock()

In this example, ``block() ... endblock()`` is used to isolate the
variable settings from later cases.  A single build tree is used for
all cases inside the block.  The first step cleans the build tree and
runs CMake to configure the case's project.  The second step runs
``cmake --build`` to drive the generated build system and merges the
build tool's ``stderr`` into its ``stdout``.  Note that each call uses
a unique case name so that expected results can be expressed individually.

Running a Test
==============

Each call to ``add_RunCMake_test(Example)`` in `CMakeLists.txt`_ creates
a test named ``RunCMake.Example`` that may be run with ``ctest``::

  $ ctest -R "^RunCMake\.Example$"

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 cases in ``RunCMake.Example`` that start with
``example``.

To speed up the process of creating a new ``RunCMake`` test, you can run a
script that will automatically perform steps 1 through 4 for you::

  cmake -DRunCMake_TEST_SUITE=<test suite name> -P Tests/RunCMake/AddRunCMakeTestSuite.cmake

Be sure to run this from the top-level CMake source directory.