CMake/Tests/RunCMake
Brad King 24f0848836 Tests: Update expected results for ninja post-1.12 development
Account for changes to upstream ninja:

* commit `5d93f2da28` (Add exit code to the failed target, 2024-12-03)
* commit `311bf93416` (Propagate jobs' exit codes to the ninja's exit code,
                       2024-12-03)
2025-01-16 08:14:25 -05:00
..
ABI
add_compile_definitions Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
add_custom_command Merge topic 'custom-command-output-hash-character' 2024-05-16 11:24:56 -04:00
add_custom_target add_custom_command: Allow OUTPUT filenames containing a hash '#' character 2024-05-15 13:27:46 -04:00
add_dependencies Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
add_executable Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
add_library add_library: Reject shared libraries on platforms that do not support them 2024-03-29 11:06:32 -04:00
add_link_options Tests: Remove or silence instances of ${CMAKE_CFG_INTDIR} 2023-02-03 11:24:56 -05:00
add_subdirectory Ninja Multi-Config: Fix crash if config list is changed in subdirectory 2024-06-21 12:21:36 -04:00
add_test Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR 2024-01-29 10:30:24 -05:00
alias_targets Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
Android
AndroidMK
AndroidTestUtilities
AppleSilicon macOS: Suppress default '-arch arm64' with CMAKE_<LANG>_COMPILER_TARGET 2023-03-15 10:50:26 -04:00
AppleTextStubs Apple Text Based Stubs: should be usage in subdirectories 2024-03-14 14:33:48 +01:00
AutoExportDll Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
Autogen Autogen/RCC: Disable zstd if it is not supported 2024-02-09 09:10:41 -05:00
block
build_command Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
BuildDepends Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
BuiltinTargets Optionally make test target depend on all 2023-11-10 13:19:11 -05:00
BundleUtilities Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
Byproducts Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CacheNewline Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CheckCompilerFlag Merge branch 'backport-3.28-ci-xcode-15.3' 2024-03-12 09:49:17 -04:00
CheckIPOSupported Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
CheckLinkerFlag
CheckModules codespell: Fix typos 2023-05-22 16:51:15 -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 Add generator expression support to static code analysis hooks 2023-03-27 11:48:41 -04:00
cmake_host_system_information Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
cmake_language Experimental: add an experimental feature gate for import std 2024-04-12 11:46:39 -04:00
cmake_minimum_required Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMAKE_MSVCIDE_RUN_PATH
cmake_parse_arguments Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
cmake_path Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CMakeDependentOption Add deprecation warnings for policies CMP0128 and below 2024-02-06 17:07:09 -05:00
CMakePackage find_package: Save/restore PACKAGE_PREFIX_DIR 2024-04-19 11:44:09 -04:00
CMakePresets Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
CMakePresetsBuild presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
CMakePresetsPackage presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
CMakePresetsTest presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
CMakePresetsWorkflow presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
CMakeRelease
CMakeRoleGlobalProperty
CMP0004 Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CMP0019 Tests: Teach RunCMake to optionally ignore policy version deprecation warnings 2023-02-09 16:20:31 -05:00
CMP0022 Tests: Teach RunCMake to optionally ignore policy version deprecation warnings 2023-02-09 16:20:31 -05:00
CMP0026 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0027
CMP0037 CMP0037: Restore diagnostic message for invalid ALIAS target names 2024-05-14 10:44:47 -04:00
CMP0038 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0039 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0040 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0041 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0042 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0043 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0045 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0046 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0049 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0050 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0051 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0053 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0054 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0055 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0057 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0059
CMP0060 OrangeC: Add support for OrangeC compiler 2023-09-25 12:27:29 -04:00
CMP0064 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0065 Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
CMP0068
CMP0069 Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
CMP0081 Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CMP0102 Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CMP0104
CMP0106 Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CMP0111 cmTarget: Add a way to represent imported shared library stubs 2023-07-18 13:21:01 -04:00
CMP0115 Add deprecation warnings for policies CMP0120 and below 2023-06-07 14:31:50 -04:00
CMP0116 Add deprecation warnings for policies CMP0120 and below 2023-06-07 14:31:50 -04:00
CMP0118 CMP0118: Revise documentation to describe actual behavior 2024-03-21 11:37:46 -04:00
CMP0119 OrangeC: Add support for OrangeC compiler 2023-09-25 12:27:29 -04:00
CMP0121 GenEx LIST: list operations 2023-04-16 12:00:20 +02:00
CMP0125
CMP0126 Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
CMP0129
CMP0132
CMP0135 ExternalProject: Move more internal commands out of main file 2024-05-13 20:24:47 +10:00
CMP0139 Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CMP0150 ExternalProject/FetchContent: Support relative remote URLs 2023-04-26 16:30:36 +08:00
CMP0152 file(REAL_PATH): resolve symlinks before '..' components 2023-07-20 17:02:58 -04:00
CMP0153 CMP0153: Add suggestion to use execute_process() 2023-10-27 09:43:18 -04:00
CMP0156 Tests: Update expected results for Xcode 16 2024-06-13 09:16:34 -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
Color Makefiles: quote $(COLOR) expansions 2023-06-08 11:05:11 -04:00
CommandLine Fix crash in target-specific commands called from initial cache script 2024-06-01 06:28:26 -04:00
CommandLineTar Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CompatibleInterface Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CompileDefinitions Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
CompileFeatures Tests/RunCMake/CompileFeatures: Avoid intermittent failures on AIX 2024-05-20 20:11:19 -04:00
CompilerArgs Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CompilerChange Fix regression on reconfigure with unnormalized -DCMAKE_<LANG>_COMPILER= 2024-04-10 12:03:17 -04:00
CompilerLauncher Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CompilerNotFound cmGlobalGenerator: hint about missing extensions on Windows 2023-10-24 11:21:31 -04:00
CompilerTest
CompileWarningAsError Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
Configure Tests/RunCMake/Configure: Improve variable scoping 2024-04-15 14:38:19 -04:00
configure_file Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
continue Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CPack CPack: Add tests for component containing problematic characters 2024-05-01 19:20:32 +02:00
CPack_NuGet CPack/NuGet: Build dependencies in groups 2024-06-03 11:28:49 -04:00
CPack_WIX Remove unnecessary executable permission from .ps1 scripts 2024-04-30 09:33:44 -04:00
CPackCommandLine
CPackConfig CPack: Change CPACK_PRODUCTBUILD_DOMAINS default to true (CMP0161) 2024-01-28 21:09:12 +11:00
CPackInstallProperties Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CPackSymlinks Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
Cppcheck Add generator expression support to static code analysis hooks 2023-03-27 11:48:41 -04:00
Cpplint Add generator expression support to static code analysis hooks 2023-03-27 11:48:41 -04:00
CrosscompilingEmulator Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR 2024-01-29 10:30:24 -05:00
CSharpCustomCommand Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CSharpReferenceImport Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CTest Dart,FindDart: Add policy to remove these modules 2023-02-28 08:43:45 -05:00
ctest_build Tests: Migrate CTestTest{NoBuild,NoExe} to RunCMake.ctest_{build,test} 2023-09-07 11:46:53 -04:00
ctest_cmake_error Tests: Update cmake_minimum_required version in RunCMake ctest cases 2024-03-29 14:17:58 -04:00
ctest_configure Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
ctest_coverage Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
ctest_disabled_test
ctest_empty_binary_directory ctest_empty_binary_directory: Report more detail in failure message 2023-11-09 09:11:55 -05:00
ctest_environment
ctest_fixtures CTest: Throw error if resource spec is invalid 2024-02-08 09:02:33 -05:00
ctest_labels_for_subprojects Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
ctest_memcheck codespell: Fix typos 2023-11-17 09:58:21 -05:00
ctest_skipped_test
ctest_start Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
ctest_submit ctest: Fall back to CMake environment variable for TLS server verification 2024-03-30 09:22:05 -04:00
ctest_test ctest: Restore enforcement of RESOURCE_LOCK test property 2024-04-01 12:22:29 -04:00
ctest_update Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
ctest_upload ctest: include "Time" element in Upload.xml 2024-02-27 13:51:11 -05:00
CTestCommandExpandLists Tests: Avoid using CMake{Output,Error}.log files 2023-01-18 16:40:19 -05:00
CTestCommandLine ctest: Allow --test-dir override when using presets 2024-04-24 16:45:29 -04:00
CTestResourceAllocation CTest: Throw error if resource spec is invalid 2024-02-08 09:02:33 -05:00
CTestTimeout Tests: Do not expect EINTR when sleep is interrupted on GNU/Hurd 2023-12-08 09:07:24 -05:00
CTestTimeoutAfterMatch Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
CUDA_architectures CUDA: Factor out helper to validate CMAKE_CUDA_ARCHITECTURES 2023-09-21 15:34:28 -04:00
CXXModules Tests: Update expected results for ninja post-1.12 development 2025-01-16 08:14:25 -05:00
define_property Tests: Add unit tests for property redefinition 2024-01-29 05:23:37 -05:00
DependencyGraph Tests: Update tests to run in symlinked tree 2023-09-22 09:30:52 -04:00
DependencyProviders FetchContent: Fix FIND_PACKAGE_ARGS not being passed to dep providers 2023-12-16 16:42:00 +11:00
DisallowedCommands Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
ExcludeFromAll Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
execute_process Merge topic 'execute_process-child-startup-info' 2024-05-28 08:56:42 -04:00
export EXPORT_PACKAGE_DEPENDENCIES: Add experimental feature gate 2024-03-12 14:24:53 -04:00
ExportCompileCommands
ExportImport
ExportWithoutLanguage
ExternalData Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
ExternalProject Tests: Fix RunCMake.ExternalProject when git is not available 2024-07-03 10:44:15 -04:00
ExtraGenerators Deprecate "extra" generators in favor of cmake-file-api(7) 2023-02-15 10:48:26 -05:00
FeatureSummary Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
FetchContent FetchContent: Force cmake --fresh to re-execute direct population steps 2024-06-07 18:12:12 +10:00
FetchContent_find_package FetchContent: Deprecate FetchContent_Populate(depName) 2024-05-29 18:52:24 +10:00
file file(): TOUCH, TOUCH_NOCREATE and MAKE_DIRECTORY accept empty lists 2024-05-31 22:55:20 +10:00
File_Archive Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
File_Configure
File_Generate Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
file-CHMOD
file-DOWNLOAD Merge topic 'backport-test-curl-output' into release-3.30 2024-07-29 11:28:46 -04:00
file-GET_RUNTIME_DEPENDENCIES file(GET_RUNTIME_DEPENDENCIES): propagate parent rpath on macOS 2024-04-15 11:59:39 -04:00
file-RPATH cmELF: Get correct section count for large ELF binaries 2024-03-22 10:18:06 -04:00
file-STRINGS file: STRINGS + REGEX store match results 2024-01-09 16:36:55 -05:00
FileAPI fileapi: Add CONFIGURE_DEPENDS glob info to cmakeFiles object 2024-03-19 14:55:25 -04:00
FileAPIExternalSource
find_dependency Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
find_file Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
find_library MSVC: Teach find_library to consider the 'libfoo.a' naming convention 2024-01-19 17:12:36 -05:00
find_package FindBoost: Add policy to remove this module 2024-05-03 10:30:23 -04:00
find_path Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
find_program Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
FindBoost FindBoost: Add policy to remove this module 2024-05-03 10:30:23 -04:00
FindGTK2 Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
FindLua Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
FindMatlab Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
FindOpenGL FindOpenGL: Add support for a separate GLU include directory 2024-02-05 14:06:06 -05:00
FindOpenSSL Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
FindPkgConfig FindPkgConfig: Fix parsing of quoted lists with pkgconf <1.5.1 2024-04-20 21:03:56 +03:00
FindSWIG Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
foreach Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
FPHSA FPHSA: Add hint for failure when called before project() 2024-05-01 11:25:28 -04:00
Framework Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
function
GenerateExportHeader GenerateExportHeader: Suppress clang-tidy warning 2024-04-10 16:43:48 -04:00
GeneratorExpression GenEx: Add generator expr. for CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT 2024-05-22 16:43:33 +02:00
GeneratorExpressionShortCircuit cmGeneratorExpressionNode: Fix short-circuit logic 2023-11-13 11:11:18 -05:00
GeneratorInstance
GeneratorPlatform Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
GeneratorToolset VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files 2023-11-22 10:22:12 -05:00
GenEx-COMPILE_LANG_AND_ID
GenEx-COMPILE_LANGUAGE Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05: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 list(INSERT): restore old behavior 2023-08-17 12:07:41 +02:00
GenEx-PATH PATH-genex: handle lists for path decomposition and transformations 2023-02-21 19:34:43 +01:00
GenEx-PATH_EQUAL
GenEx-TARGET_FILE Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
GenEx-TARGET_IMPORT_FILE Apple: Handle generation and comsuption of text-based stubs (.tbd files) 2023-03-01 12:23:28 +01:00
GenEx-TARGET_PROPERTY Help: Document TARGET_PROPERTY genex behavior on unset property 2024-05-10 09:50:33 -04:00
GenEx-TARGET_RUNTIME_DLLS Add test for the new TARGET_RUNTIME_DLL_PATHS genex 2023-02-26 16:37:37 +01:00
get_filename_component Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
get_property get_test_property(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
GetPrerequisites
GNUInstallDirs Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
GoogleTest Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
Graphviz Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
IAR Tests/RunCMake/IAR: Extend tests to actually build 2024-02-12 14:42:54 -05:00
if Tests: Factor out RunCMake helper to get UNIX user id 2023-11-30 17:05:00 -05:00
IfacePaths Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
include FindBoost: Add policy to remove this module 2024-05-03 10:30:23 -04:00
include_directories Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
include_external_msproject Tests: Avoid running VS 16+ tests when using a pre-v140 toolset 2024-05-13 10:57:27 -04:00
include_guard
IncludeWhatYouUse IWYU: Return error code if user enables error reporting 2023-04-25 11:18:36 -04:00
IncompatibleQt
InitialFlags
install Evaluation of TRANSITIVE_LINK_PROPERTIES isn't considered a usage 2024-07-05 13:16:47 -04:00
INSTALL_NAME_DIR
InstallParallel Ninja: Add option for parallel install 2024-05-23 09:54:19 -04:00
InterfaceLibrary Tests/RunCMake: Match 'Tried extensions' output more robustly 2023-03-09 14:35:05 -05:00
Languages Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
LanguageStandards Add CMAKE_<LANG>_STANDARD_LATEST variables 2024-04-30 11:05:03 -04:00
LinkerLauncher <LANG>_LINKER_LAUNCHER: Allow generator expressions 2023-02-02 11:58:56 -05:00
LinkerSelection Tests: Update expected results for Xcode 16 2024-06-13 09:16:34 -04:00
LinkItemValidation Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
LinkLibrariesProcessing Libraries processing: update configuration wording 2024-06-21 11:18:12 +02:00
LinkStatic Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
LinkWhatYouUse Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
list list(): restore SUBLIST behavior 2023-06-16 15:14:03 +02:00
load_cache
MacOSVersions codespell: Avoid escape sequence that looks like misspelled "nodes" 2023-05-22 16:50:51 -04:00
Make ctest: Allow passing -j without value to choose a contextual default 2024-03-10 11:41:39 -04:00
math Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
MaxRecursionDepth find_package: Enforce maximum nesting depth below maximum recursion depth 2023-03-13 11:48:19 -04:00
message codespell: Fix typos 2023-05-22 16:51:15 -04:00
MetaCompileFeatures
MSVCDebugInformationFormat
MSVCRuntimeLibrary
MSVCRuntimeTypeInfo Add deprecation warnings for policies CMP0120 and below 2023-06-07 14:31:50 -04:00
MSVCWarningFlags
MultiLint Linting: Fix empty evaluated genex 2023-09-25 09:16:33 -04:00
Ninja Merge topic 'clang-cl-showIncludes' 2024-02-08 09:40:54 -05:00
NinjaMultiConfig CUDA/Clang: Add support for MSVC ABI on Windows using GNU-like frontend 2024-01-22 09:33:54 -05:00
NinjaPrivateDeps Tests/NinjaPrivateDeps: fix error message for Build-PrivateFileSet-check 2023-10-16 11:38:43 -04:00
no_install_prefix Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
ObjectLibrary Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
ObsoleteQtMacros
option
ParseImplicitData Tests: Cover detection of linker tool for Intel on Windows 2024-01-03 16:24:57 -05:00
ParseImplicitIncludeInfo Tests: Update sample data for parsing implicit link/include information 2024-01-03 16:20:27 -05:00
ParseImplicitLinkInfo Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
Policy
PolicyScope Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
PositionIndependentCode Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
PrecompileHeaders Merge topic 'restore-pch-with-unity' 2024-02-05 09:57:19 -05:00
PrintHelpers Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
project project: Only check non-cache vars when setting project vars 2024-10-07 10:24:37 -04:00
project_injected Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
property_init cmTarget: support the CXX_MODULE_STD property 2024-04-11 10:19:44 -04:00
return
RunCPack CPack/NuGet: Build dependencies in groups 2024-06-03 11:28:49 -04:00
RuntimePath Link explicitly to private transitive dependencies on stub libraries 2024-01-04 11:59:26 -05:00
ScriptMode
separate_arguments Tests: Avoid unnecessary copy of cmake in RunCMake.separate_arguments 2024-04-15 10:13:28 -04:00
set set: Improve diagnostics for CACHE mode 2023-08-02 10:07:56 -04:00
set_property cmTarget: Don't allow setting read-only properties 2024-01-23 08:50:38 -05:00
set_tests_properties set_tests_properties(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
SourceProperties Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
string Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
Swift Tests: Update expected results for ninja post-1.12 development 2025-01-16 08:14:25 -05:00
SymlinkTrees Tests/RunCMake: Set $ENV{PWD} before each test 2023-09-11 16:58:14 -04:00
Syntax Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
target_compile_definitions Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_compile_features Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_compile_options Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_include_directories
target_link_directories
target_link_libraries Merge topic 'Xcode-Check-Imported-Framework' 2023-12-19 08:04:01 -05:00
target_link_libraries-ALIAS Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_link_libraries-LINK_GROUP Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_link_libraries-LINK_LANG_AND_ID Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_link_libraries-LINK_LANGUAGE Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
target_link_libraries-LINK_LIBRARY GenEx $<LINK_LIBRARY>: Add the support of properties attached to features 2024-05-15 10:02:36 +02:00
target_link_options LINK_OPTIONS: ensure correct dollar escaping 2023-07-17 15:55:58 +02:00
target_sources cmTarget: Don't allow setting read-only properties 2024-01-23 08:50:38 -05:00
TargetArtifacts Add option to add SOVERSION to DLL names 2023-02-27 09:18:34 -05:00
TargetObjects Restore support for TARGET_OBJECTS in link interfaces with unity builds 2024-02-21 17:08:57 -05:00
TargetPolicies VS: Add UseDebugLibraries to vcxproj files by default 2024-02-22 08:43:16 -05:00
TargetProperties Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
test_include_dirs
TIClang TIClang: Add support for TI Clang-based compilers, including tiarmclang 2024-02-09 15:54:40 -05:00
ToolchainFile Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
TransformDepfile cmTransformDepfile: warn when a depfile is not written to 2023-11-01 14:08:18 -04:00
try_compile try_compile: Propagating top level includes into whole-project calls 2024-05-30 19:01:03 +10:00
try_run Tests: Fix RunCMake.try_run case on gfortran < 4.3 2023-12-07 10:49:25 -05:00
UnityBuild Unity: Enable UNITY_BUILD for OBJC and OBJCXX files 2023-10-26 10:01:41 -04:00
UseSWIG Add deprecation warnings for policies CMP0126 and below 2023-10-03 17:21:47 -04:00
variable_watch Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
VerifyHeaderSets VERIFY_INTERFACE_HEADER_SETS: Suppress clang-tidy include checks 2024-04-08 19:15:21 -04:00
VisibilityPreset Deprecate compatibility with CMake versions older than 3.5 2023-02-11 06:25:11 -05:00
VS10Project VS: Add option to import .props in .vcxproj.filters files 2024-05-02 00:30:00 +08:00
VS10ProjectUseDebugLibraries VS: Add UseDebugLibraries to vcxproj files by default 2024-02-22 08:43:16 -05:00
VS10ProjectWinCE
VsDotnetSdk Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
VsNugetPackageRestore
VSSolution Drop Visual Studio 9 2008 generator 2024-05-08 10:37:34 -04:00
while Tests/RunCMake: Update cmake_minimum_required versions 2023-02-11 06:24:22 -05:00
Win32GenEx
WorkingDirectory
WriteBasicConfigVersionFile
WriteCompilerDetectionHeader Add deprecation warnings for policies CMP0120 and below 2023-06-07 14:31:50 -04:00
XcFramework Merge branch 'backport-3.28-visionOS' into visionOS 2024-02-09 11:37:11 -05:00
XcodeProject Xcode: Restore support for CMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD) 2024-07-19 09:42:45 -04:00
XcodeProject-Device Merge branch 'backport-3.28-visionOS' into visionOS 2024-02-09 11:37:11 -05:00
XcodeProject-Embed Xcode: Add support to embed XPC Services 2023-11-30 10:09:34 +13:00
AddRunCMakeTest.cmake Tests/RunCMake: Add script to auto-generate RunCMake test suite stub 2023-03-07 14:30:29 -05:00
CMakeLists.txt CPack/NuGet: Build dependencies in groups 2024-06-03 11:28:49 -04:00
color_warning.c
detect_jobserver.c Reduce scope of variable 2024-02-14 20:46:03 +01:00
exit_code.c
exit_crash.c Tests: Cover execute_process with abnormal exit on all platforms 2024-05-14 09:32:53 -04:00
fake_build_command.c
FileAPIDummyFile.cmake
print_stdin.c Fix clang -Wstrict-prototypes by making main take void instead of nothing 2023-10-20 12:20:13 -04:00
pseudo_cppcheck.c
pseudo_cpplint.c
pseudo_emulator_custom_command_arg.c
pseudo_emulator_custom_command.c
pseudo_emulator.c Tests: Teach pseudo_emulator helper to pass by default 2024-01-27 09:50:43 -05:00
pseudo_iwyu.c
pseudo_llvm-rc.c
pseudo_tidy.c
README.rst Tests/RunCMake: Document how to write multi-step test cases 2024-05-23 16:11:46 -04:00
RunCMake.cmake Tests/RunCMake: Add option to print custom details in failure output 2024-03-18 14:04:17 -04:00
RunCPack.cmake Tests/RunCMake: Add new infrastructure to run cpack 2024-03-18 14:04:17 -04:00
RunCTest.cmake Tests/RunCMake: Add copyright and license notices to test infrastructure 2024-02-05 12:39:56 -05:00
showIncludes.c Merge topic 'clang-cl-showIncludes' 2024-02-08 09:40:54 -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`_ and the `CMake Source Code Guide`_.

.. _`../README.rst`: ../README.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.