summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'Ninja-LINK_OPTIONS-with-newlines'Marc Chevrier2023-12-232-0/+9
|\ | | | | | | | | | | | | | | 255c2e1430 Ninja: LINK_OPTIONS property should support newlines Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9096
| * Ninja: LINK_OPTIONS property should support newlinesMarc Chevrier2023-12-202-0/+9
| | | | | | | | Fixes: #25513
* | Merge topic 'package-dispatch-apple'Brad King2023-12-2019-2/+59
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4ac5a2f866 CMakePackageConfigHelpers: Add generate_apple_architecture_selection_file() b9f81ee9f9 CMakePackageConfigHelpers: Remove outdated documentation summary paragraph 68a03cf3d4 generate_apple_platform_selection_file: Add INSTALL_PREFIX option ff21f0f70f Tests: Verify generate_apple_platform_selection_file file paths Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9092
| * | CMakePackageConfigHelpers: Add generate_apple_architecture_selection_file()Brad King2023-12-1910-2/+46
| | | | | | | | | | | | | | | | | | | | | Add a helper to select architecture-specific implementations of a package on an Apple-specific platform. Fixes: #25516
| * | generate_apple_platform_selection_file: Add INSTALL_PREFIX optionBrad King2023-12-191-0/+1
| | | | | | | | | | | | This is necessary to forward to `configure_package_config_file`.
| * | Tests: Verify generate_apple_platform_selection_file file pathsBrad King2023-12-1910-0/+12
| | |
* | | Merge topic 'add_test-CROSSCOMPILING_EMULATOR-exclusive'Brad King2023-12-205-0/+108
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ca5a300d7f add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8947
| * | | add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compilingRalf Habacker2023-12-195-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | Add policy CMP0158 to provide compatibility for existing projects. Fixes: #23672
* | | | Merge topic 'swift-CMP0157-old'Brad King2023-12-202-3/+12
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | d31b48816c Swift/Ninja: Fix missing OFM in CMP0157 OLD behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9089
| * | | Swift/Ninja: Fix missing OFM in CMP0157 OLD behaviorEvan Wilde2023-12-192-3/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | The CMP0157 old behavior omitted the output-file-map after the Swift build split because we stopped calling `EmitSwiftDependencyInfo` when we could not split the build because we didn't call `WriteObjectBuildStatement`. If we can't split the build, then we still need to include the OFM information to not break incremental builds.
* | | Merge topic 'gtest_discover_tests_error_message'Brad King2023-12-192-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2ea216a6bb GoogleTest: Add working directory to gtest_discover_tests error message Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9083
| * | | GoogleTest: Add working directory to gtest_discover_tests error messageAlexander Krabler2023-12-182-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the working directory didn't exist, the old message just says: Error running test executable. Path: '<Path to test executable>' Result: No such file or directory Output: This leads the user to the conclusion that the test executable doesn't exist, which isn't true. Make the true cause visible by reporting the working directory in the error message.
* | | Merge topic 'package-dispatch-apple'Brad King2023-12-194-0/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc5098429b CMakePackageConfigHelpers: Clarify Apple platform selection usage error 3b9586671c CMakePackageConfigHelpers: Clarify Apple platform selection template name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9087
| * | | CMakePackageConfigHelpers: Clarify Apple platform selection usage errorBrad King2023-12-184-0/+15
| | | | | | | | | | | | | | | | `generate_apple_platform_selection_file` requires `INSTALL_DESTINATION`.
* | | | Merge topic 'Xcode-Check-Imported-Framework'Brad King2023-12-192-0/+28
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | defbfd6f55 Xcode: Restore support for standalone IMPORTED_LOCATION_<CONFIG> Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9082
| * | Xcode: Restore support for standalone IMPORTED_LOCATION_<CONFIG>Marc Chevrier2023-12-182-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 878ae03832 (macOS: IMPORTED framework: Honor SYSTEM target property in all cases, 2023-08-27, v3.28.0-rc1~162^2) we broke support for `IMPORTED_LOCATION_<CONFIG>` without `IMPORTED_CONFIGURATIONS`. Previously it worked if the importing project's configurations match the set of `IMPORTED_LOCATION_<CONFIG>` properties set. Fix that case. Fixes: #25506 Issue: #25515
* | | Merge topic 'package-dispatch-apple'Brad King2023-12-1827-0/+180
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1dd4a9baff Tests: Cover generate_apple_platform_selection_file on all platforms 3148db4533 CMakePackageConfigHelpers: Fix Apple platform selection for tvOS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9077
| * | | Tests: Cover generate_apple_platform_selection_file on all platformsBrad King2023-12-1627-0/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test added by commit 37bc3400cd (CMakePackageConfigHelpers: Add generate_apple_platform_selection_file(), 2023-11-03) covers importing only on macOS, and is specific to the xcframework test case. Add a dedicated test for `generate_apple_platform_selection_file` that covers export and import on all platforms.
* | | | Merge topic 'fc-provider-find-package-args'Craig Scott2023-12-173-0/+19
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | 0415304970 FetchContent: Fix FIND_PACKAGE_ARGS not being passed to dep providers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9080
| * | | FetchContent: Fix FIND_PACKAGE_ARGS not being passed to dep providersCraig Scott2023-12-163-0/+19
| |/ / | | | | | | | | | Fixes: #25504
* | | Merge topic 'swift-split-compilation-model'Brad King2023-12-163-11/+19
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 9bed4f4d81 Swift/Ninja: Split compilation model 64b3367845 cmGlobalGenerator: Allow passing language to GetLangaugeOutputExtension Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8907
| * | Swift/Ninja: Split compilation modelEvan Wilde2023-12-153-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Splitting the Swift build into an object build and a separate link step, instead of building and linking in one step. The immediate benefit is LSP support because we are able to emit compile-commands for Swift files now. Additionally, it is possible to specify flags to the compile step, enabling folks to emit C and C++ headers from their Swift builds for C/C++ interop, without needing custom commands. Eventually, this gives us a path toward working object libraries. Object Libraries: - Object libraries don't work today because CMake doesn't emit targets for object libraries into the Ninja build file. - tl;dr: Object libraries work if they aren't WMO. Still need work to make WMO'd object libraries work. Object libraries still don't completely work with this patch because, while we emit the targets, the `TARGET_OBJECTS` generator expression expansion has a separate mechanism for determining what the names of the objects are based on the input source files, so targets that depend on an object library built with a whole-module optimization will depend on objects based on the name of the source file instead of the actual emitted object file. These features require being able to accurately model wholemodule builds though, because we actually need to track object files and WMO affects what objects are emitted. For that, we require CMP0157 use the NEW policy. When it's OLD, we have to fall back on the old behavior and cannot provide object libraries or the compile-commands for LSP. Issue: #25308
* | | Merge topic 'cmake-test-launcher'Brad King2023-12-1520-8/+374
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 88863d83d6 fileapi: Add test launcher to codemodel-v2 1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets 478a5f4e04 fileapi: Make launcher attribute 'arguments' optional b44e38a397 cmFileAPICodemodel: Add missing std::move() Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8963
| * | | fileapi: Add test launcher to codemodel-v2Ralf Habacker2023-12-1311-1/+245
| | | | | | | | | | | | | | | | | | | | We do not need to bump the minor version because it was recently bumped by addition of the cross-compiling emulator as another kind of launcher.
| * | | add_test: Optionally use a launcher for tests running in-project targetsRalf Habacker2023-12-138-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER` target property. Issue: #23672
| * | | fileapi: Make launcher attribute 'arguments' optionalRalf Habacker2023-12-132-7/+9
| |/ / | | | | | | | | | | | | This was missed in commit 80a64c9ce5 (fileapi: Add cross-compiling emulator to codemodel-v2, 2023-11-11).
* | | Merge topic 'FindCUDAToolkit-cupti'Brad King2023-12-154-1/+38
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 04959e0285 Tests: Verify CUDA::cupti existence on a subset of machines 09a3c8b46b CUDAToolkit: Correctly search all include paths from compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9072
| * | Tests: Verify CUDA::cupti existence on a subset of machinesRobert Maynard2023-12-144-1/+38
| | | | | | | | | | | | When we know that the cupti library exists explicitly request the CUDA Toolkit test to verify the existence
| * | Merge topic 'test-gnu-hurd-sleep' into release-3.28Brad King2023-12-091-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 8f53526dec Tests: Do not expect EINTR when sleep is interrupted on GNU/Hurd Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9052
* | | | Tests/RunCMake/XcFramework: Add iOS and iOS Simulator to .xcfwKyle Edwards2023-12-116-50/+107
| | | |
* | | | Merge topic 'find-rustc-importlibs'Brad King2023-12-097-1/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f20c5c6f20 MSVC: Teach find_library to consider Rust's '${name}.dll.lib' convention 7598ea5389 Tests: Add case covering find_library behavior when targeting MSVC ABI Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9046
| * | | | MSVC: Teach find_library to consider Rust's '${name}.dll.lib' conventionDaniel Ching2023-12-084-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This convention is used by Rust toolchains (rustc/cargo/cargo-c) for the MSVC ABI. Fixes: #25478
| * | | | Tests: Add case covering find_library behavior when targeting MSVC ABIBrad King2023-12-075-1/+10
| | | | |
* | | | | Merge topic 'test-gnu-hurd-sleep'Brad King2023-12-091-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | 8f53526dec Tests: Do not expect EINTR when sleep is interrupted on GNU/Hurd Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9052
| * | | | Tests: Do not expect EINTR when sleep is interrupted on GNU/HurdMattias Ellert2023-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `RunCMake.CTestTimeout` failed on GNU/Hurd because the `sleep` command does not set `errno` to `EINTR` when interrupted by a signal, which is a Linux-specific feature.
* | | | | Merge topic 'ninja-dev'Brad King2023-12-092-4/+11
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 101ac06b28 Tests: Update for changes to upstream ninja development version Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !9053
| * | | | Tests: Update for changes to upstream ninja development versionBrad King2023-12-082-4/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Account for: * commit `8f47d5aa33` (Remove `-w dupbuild` completely, always error on duplicate edges, 2023-11-29) * commit `4d98903d4c` (Improve misleading error message when an output is defined multiple times, 2023-12-06)
| * | | Merge topic 'cxxmodules-msvc-corner-cases' into release-3.28Brad King2023-12-065-3/+27
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e63983956d Tests/CXXModules: enhance `internal-partitions` test 8a658fb9ec Tests/CXXModules: import from an internal partition Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9039
| * \ \ \ Merge topic 'fix-cxx-module-transitive-requirements' into release-3.28Brad King2023-12-0635-1/+384
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e9b0dcbbfa cmCxxModuleMapper: Fix transitive requirements computation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9030
| * \ \ \ \ Merge topic 'LLVMFlang-MSVC-debug' into release-3.28Brad King2023-12-062-4/+9
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef49ed0fe1 LLVMFlang: Fix MSVC ABI debug information format options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9037
* | | | | | | Tests: Fix RunCMake.try_run case on gfortran < 4.3Brad King2023-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0f37000304 (try_{compile,run}: add LINKER_LANGUAGE option, 2023-10-12) the test has failed with gfortran < 4.3 because it does not support the Fortran syntax used by the test. Add a version check.
* | | | | | | Tests: Add inspection step to RunCMake.try_runBrad King2023-12-073-4/+37
| | | | | | |
* | | | | | | Tests: Remove unused code from RunCMake.try_runBrad King2023-12-071-4/+0
| | | | | | |
* | | | | | | Merge topic 'GoogleTest-discovery-scope'Brad King2023-12-073-0/+53
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0767016eab GoogleTest: Avoid silent failures of dynamic test discovery Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9038
| * | | | | | | GoogleTest: Avoid silent failures of dynamic test discoveryMoritz Haase2023-12-063-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal helper variable '_GOOGLETEST_DISCOVER_TESTS_SCRIPT' can have gone out-of-scope when 'gtest_discover_tests()' is called, depending on where the GoogleTest module is actually included. This leads to a silent failure of dynamic test discovery, since the custom post-build commands actually does nothing (it basically invokes 'cmake -P ""'). Ctest will then fail to run the tests, considering them to be 'not built'. Fix this by determining the path to the GoogleTest module based on '${CMAKE_ROOT}' instead, which is always available. A new test case was added to test suite 'RunCMake/GoogleTest' to ensure that 'gtest_discover_tests()' works correctly when invoked in a different variable scope. Fixes: #25477
* | | | | | | | Merge topic 'LLVMFlang-MSVC'Brad King2023-12-074-3/+28
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd28915260 LLVMFlang: Update MSVC ABI and architecture detection for LLVMFlang 18.0 48302b469e LLVMFlang: Update MSVC runtime library selection for LLVMFlang 18.0 1c07758ca2 CMakeParseImplicitLinkInfo: Exclude LLVMFlang program entry point for MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9036
| * | | | | | | | LLVMFlang: Update MSVC runtime library selection for LLVMFlang 18.0Brad King2023-12-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVMFlang 18.0 adds MSVC runtime library selection flags and associated Fortran runtime library variants. Resolve the corresponding FIXME left by commit 26bf32cdc6 (LLVMFlang: Add support for targeting MSVC ABI on Windows, 2023-09-28, v3.28.0-rc1~10^2). Issue: #24840
| * | | | | | | | CMakeParseImplicitLinkInfo: Exclude LLVMFlang program entry point for MSVCBrad King2023-12-063-0/+23
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of llvm-project `main` branch commit `86accd4e03` (2023-12-04), LLVMFlang 18.0.0, when used to drive linking an executable, emits a MSVC linker flag to use all object files from the `Fortran_main` library. These object files are meant for use when linking the program entry point, and so are not implicit link dependencies of Fortran libraries.
* | | | | | | | Merge topic 'cmuvprocesschain-external-loop'Brad King2023-12-071-1/+52
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0b043a75b7 cmUVProcessChain: Add option for external uv_loop_t Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9040
| * | | | | | | cmUVProcessChain: Add option for external uv_loop_tKyle Edwards2023-12-051-1/+52
| |/ / / / / /