summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'cmake-language-exit-code'Brad King2024-01-1726-0/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1bb1769235 cmake_language: Add EXIT subcommand 4f160f7906 cmakemain: Return the SCRIPT_MODE exit code if it was set b62dcbf5d2 cmMakefile: check cmake script mode exit code after command 3d9d504646 cmMakefile: Store the exit code from cmExecutionStatus to cmake instance 9f6c937408 Source/cmake.h: Add ScriptModeExitCode for proper storing exit code 1082b9cb9a cmExecutionStatus: Add ability to set optional custom exit code Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Leonid Pospelov <pospelovlm@yandex.ru> Acked-by: NoMaY (a user of Renesas Rulz Japanese Forum) <nomay-jp@outlook.com> Merge-request: !8228
| * cmake_language: Add EXIT subcommandleha-bot2024-01-1626-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | Add tests to cover these cases: * run as regular CMake module, in NORMAL_MODE (expected to fail); * run as CMake script in SCRIPT_MODE (expected to exit with given code); * run as CMake script that `include()`-s another script with EXIT subcommand; * run as CMake script which EVAL-uates EXIT subcommand via `cmake_language(EVAL CODE "<cmake code>")`. Fixes: #23162
* | Merge topic 'lcc-updates-2024-01'Brad King2024-01-171-5/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 202f4b3161 Tests: Exclude some tests on broken libc on Elbrus 9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21 1dbb31cea2 libarchive: avoid lchmod not implemented warning on old LCC 83af26d9ad LCC: Don't enable debugger on LCC that don't have <future> fa764ce311 liblzma: Make cmliblzma buildable on LCC 1.21 77e046b47c jsoncpp: fix missing template deletion support on LCC < 1.23 67de0c197b cmcurl: fix X509_STORE_up_ref issue not just on LCC 1.23, but on LCC <= 1.23 9bc2aba3b4 LCC: get rid of ambiguous assignments of {} for LCC ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9157
| * | Tests: Exclude some tests on broken libc on Elbrusmakise-homura2024-01-161-5/+9
| |/ | | | | | | | | These tests found to be occasionally failing, so just in case CMake is used in such environment, don't test this at all.
* | Merge topic 'cxxmodules-obj-lib'Brad King2024-01-174-0/+20
|\ \ | |/ |/| | | | | | | | | | | | | c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !9154
| * cxxmodules: compute link information for C++ module-consuming targetsMatheus Izvekov2024-01-144-0/+20
| | | | | | | | | | | | | | | | | | Compute link information for all C++ targets which support modules instead of just those which may provide modules, as they may import modules as well. This captures `OBJECT` libraries using modules which otherwise do not have link steps. Fixes: #25592
| * Merge topic 'vs-scan-for-modules' into release-3.28Brad King2024-01-106-3/+40
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 405dc7d19c Tests/CXXModules/scan_properties: use `ixx` extension 029ddc3410 cmVisualStudio10TargetGenerator: always specify scanning 6c9614cbf4 Tests/CXXModules: add a test case for VS generation without flags 34f4423851 cmVisualStudio10TargetGenerator: fix typo in flag name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9104
| * \ Merge topic 'cxxmodules-no-unity' into release-3.28Brad King2024-01-107-0/+68
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds 76b5383123 cmGlobalGenerator: add unity sources after computing target compile features 7fc2a83fe6 Tests/CXXModules: add a test with unity build support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9118
* | \ \ Merge topic 'swift-sources-in-resp-file'Brad King2024-01-121-4/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b767917ebb Swift/Ninja: Include sources in response file Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9143
| * | | | Swift/Ninja: Include sources in response fileEvan Wilde2024-01-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike C/C++, Swift compiles all sources in a module at once. This can quickly overwhelm the commandline length limit on Windows, so it is useful to place the source files in the response file. Issue: #25572
* | | | | Merge topic 'file-strings-regex-match'Brad King2024-01-1113-0/+62
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fa00928bcd file: `STRINGS` + `REGEX` store match results ff0085cf74 Help: Drop incorrect versionadded mark from CMAKE_MATCH_<n> Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9124
| * | | | | file: `STRINGS` + `REGEX` store match resultsCristian Le2024-01-0913-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
* | | | | | Merge topic 'swift-implib'Brad King2024-01-113-0/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a2aad7eb8d Swift: fix Windows DLL import library support for CMP0157 NEW Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Jeremy Day <jadaytime@gmail.com> Merge-request: !9140
| * | | | | | Swift: fix Windows DLL import library support for CMP0157 NEWSaleem Abdulrasool2024-01-103-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was accidentally removed when the command templates were reorganized to introduce the new policy. Restore the flag in the shared library creation to ensure that we emit the import libraries to the correct location.
* | | | | | | Merge topic 'package-dispatch-apple'Brad King2024-01-116-19/+19
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2a398cd9b6 CMakePackageConfigHelpers: Clarify generate_apple_*_selection_file signatures Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9130
| * | | | | | CMakePackageConfigHelpers: Clarify generate_apple_*_selection_file signaturesBrad King2024-01-056-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The helpers added by: * commit 37bc3400cd (CMakePackageConfigHelpers: Add generate_apple_platform_selection_file(), 2023-11-03) * commit 4ac5a2f866 (CMakePackageConfigHelpers: Add generate_apple_architecture_selection_file(), 2023-12-19) were worded in terms of including package configuration files, but the actual functionality is to include files *from* package configuration files. The included files do not themselves need to be usable as package configuration files. Rename the options and clarify the documentation accordingly. Issue: #25262 Issue: #25516
* | | | | | | Merge topic 'static'Brad King2024-01-103-0/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9e829779f2 Swift: preserve `-static` for static library swiftmodules Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9141
| * | | | | | | Swift: preserve `-static` for static library swiftmodulesSaleem Abdulrasool2024-01-093-0/+17
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `-static` is important for the emission of the module as it is serialized into the swiftmodule which then is used by the Swift frontend to decide how to link to the symbol (via the GOT or not, or the IAT on Windows). This repairs building static libraries with Swift on Windows.
* | | | | | | Merge topic 'vs-scan-for-modules'Brad King2024-01-106-3/+40
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 405dc7d19c Tests/CXXModules/scan_properties: use `ixx` extension 029ddc3410 cmVisualStudio10TargetGenerator: always specify scanning 6c9614cbf4 Tests/CXXModules: add a test case for VS generation without flags 34f4423851 cmVisualStudio10TargetGenerator: fix typo in flag name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9104
| * | | | | | Tests/CXXModules/scan_properties: use `ixx` extensionBen Boeckel2024-01-092-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that Visual Studio is told not to scan this explicitly.
| * | | | | | Tests/CXXModules: add a test case for VS generation without flagsBen Boeckel2024-01-064-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the `ScanSourceForModuleDependencies` flag was not added to the VS project if "nothing" prompted custom flags. See: #25519
* | | | | | | Merge topic 'cxxmodules-no-unity'Brad King2024-01-107-0/+68
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds 76b5383123 cmGlobalGenerator: add unity sources after computing target compile features 7fc2a83fe6 Tests/CXXModules: add a test with unity build support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9118
| * | | | | | Tests/CXXModules: add a test with unity build supportBen Boeckel2024-01-057-0/+68
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | C++ module-using TUs cannot participate in unity builds. Add a test case for this situation.
* | | | | | Merge topic 'makefile-depfile'Brad King2024-01-103-0/+22
|\ \ \ \ \ \ | |_|/ / / / |/| | | | / | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | 7198f0d149 Makefile: Fix double escaping when DEPFILE is used 5162ff64d4 Makefile: Reduce string copies Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9138
| * | | | Makefile: Fix double escaping when DEPFILE is usedOrkun Tokdemir2024-01-093-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit cfd8a5ac1f (Makefiles: Add support of DEPFILE for add_custom_command, 2020-12-04, v3.20.0-rc1~237^2~1) we added a `ConvertToOutputPath` call on a path given to the `depends` field of `WriteMakeRule`. The latter already handles escaping for Makefile syntax. Fixes: #25554
* | | | | Merge topic 'ewilde/swift-ninja-response-files'Brad King2024-01-093-0/+24
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a6a5c43300 Swift/Ninja: Add support for response files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9098
| * | | | | Swift/Ninja: Add support for response filesEvan Wilde2024-01-083-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for `CMAKE_NINJA_FORCE_RESPONSE_FILE` with Swift. Issue: #25490 Fixes: #25563
* | | | | | Tests: Avoid procedure stack overflow in broken libc on Elbrusmakise-homura2024-01-081-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On E2K architecture, there is at least one known version of libc that is built with a bug that leads to a kernel error like `procedure stack could not be copied` visible in `dmesg` in several tests (and such test immediately receives `SIGSEGV` and fails). It was first detected in !8665, and after a long investigation, the culprit was finally found (MCST bugzilla internal bug 124224). Avoid running tests known to fail if such a version of libc is detected.
* | | | | | Tests: Improve RunCMake.export expected output matching robustnessmakise-homura2024-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "multiple other export sets" message may wrap lines differently depending on the path to the test.
* | | | | | Tests: With lfortran < 1.24 skip cases broken by incorrect filename handlingmakise-homura2024-01-083-1/+27
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `lfortran` < 1.24 uses `fccn`, a Fortran-to-C converter that incorrectly handles long filenames that are more than 128 characters long; so to check if Fortran can compile something, CMake must be run in binary directory that has a name of less that 35 characters long. It is ok for typical runs line `cmake -S . -B build` or `cmake ..`, but does not work with usual CDash dashboard testing paths. All this is not a problem for modern LCC >= 1.24.
* | | | | Merge topic 'link-stubs-transitively'Brad King2024-01-088-9/+80
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2c6ec6de15 Link to transitive dependencies on stub libraries only on some linkers dd4a6dff92 Link explicitly to private transitive dependencies on stub libraries 5f1bbdb3b3 Tests: Enable RunCMake.RuntimePath test on more platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9050
| * | | | Link explicitly to private transitive dependencies on stub librariesBrad King2024-01-048-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We represent stub libraries, e.g., for CUDA, using imported `SHARED` library targets with only `IMPORTED_IMPLIB`, and no `IMPORTED_LOCATION`, to indicate that the stub file is meant only for linkers and not dynamic loaders. See commit 7351d590ee (cmTarget: Add a way to represent imported shared library stubs, 2023-07-17, v3.28.0-rc1~344^2) and commit fc6508921c (cmComputeLinkInformation: Restore soname lookup for non-imported targets, 2023-12-05, v3.28.0~4^2). If a shared library is linked to a stub, it has a `NEEDED` field populated with the `SONAME` found in the stub. When a dependent target links to such a shared library, some linkers want to find a library file on disk and load it to see what symbols it provides. This is necessary for linkers that enforce `--no-allow-shlib-undefined`. On hosts with only the stub library installed, e.g., with only the CUDA toolkit development package, the real runtime library corresponding to the stub's `SONAME` may not even exist, so no `-rpath-link` flag can help linkers find it. Pass the stub library to linkers explicitly so they can find it without searching.
| * | | | Tests: Enable RunCMake.RuntimePath test on more platformsBrad King2024-01-042-9/+11
| | |_|/ | |/| | | | | | | | | | Move the "ELF" check to specific cases inside the test.
* | | | Merge topic 'swift-always-restat'Brad King2024-01-053-2/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1161ad76ac Swift/Ninja: Always restat swift build commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9076
| * | | | Swift/Ninja: Always restat swift build commandsJeremy Day2024-01-043-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The swift toolchain leaves output files untouched if there are no meaningful input changes; without restat, this causes ninja to needlessly rebuild targets that are not actually out-of-date Fixes: #25496
* | | | | Merge topic 'swift-compile-commands'Brad King2024-01-053-0/+44
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44f29a4291 Swift/Ninja: Fix multifile module compile commands Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9095
| * | | | | Swift/Ninja: Fix multifile module compile commandsEvan Wilde2024-01-033-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swift compile commands need to have all source files in the module specified in the compile command or LSP systems will report errors on missing types that are defined in other source files in the same module. Issue: #25491
* | | | | | Merge topic 'test-RunCMake.ExternalProject'Brad King2024-01-051-0/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3253bc306e Tests: Optionally run RunCMake.ExternalProject serially Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9129
| * | | | | | Tests: Optionally run RunCMake.ExternalProject seriallyBrad King2024-01-041-0/+3
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some machines running many tests concurrently, the `INACTIVITY_TIMEOUT` cases do not always complete within their individual timeout. Add an undocumented cache entry to use on those machines to run the test serially.
* | | | | | Merge topic 'check_language_propagate_hip_platform'Brad King2024-01-053-0/+38
|\ \ \ \ \ \ | |/ / / / / |/| | | / / | | |_|/ / | |/| | | | | | | | | | | | | | | | | | ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language 9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9121
| * | | | HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_languageGergely Meszaros2024-01-043-0/+38
| | |_|/ | |/| | | | | | | | | | Fixes: #25541
* | | | Merge topic 'compute-compiler-linker'Brad King2024-01-04180-71/+1740
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 459d1cc095 Tests: Verify that linker tool is detected and identified where expected 6aec4739c1 LinkerId: Record detection steps to configure log ba5f8dbba3 LinkerId: Use empty string for unknown linker id 6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms 9324668517 LinkerId: Fix detection of GNU linker id without parenthesis in version output 37bc148870 LinkerId: Fix detection of linker tool without path 6e527c2d38 LinkerId: Fix detection of linker tool for Clang on OpenBSD 455aed3061 LinkerId: Fix detection of linker tool for MSVC ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9086
| * | | Tests: Verify that linker tool is detected and identified where expectedBrad King2024-01-032-2/+36
| | | |
| * | | LinkerId: Match Apple linker on all Apple platformsBrad King2024-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | `cmake_determine_linker_id` is only used for macOS because Apple device platforms set `_CMAKE_FEATURE_DETECTION_TARGET_TYPE` to `STATIC_LIBRARY`, but we might as well prepare for them anyway.
| * | | LinkerId: Fix detection of GNU linker id without parenthesis in version outputBrad King2024-01-033-0/+6
| | | |
| * | | LinkerId: Fix detection of linker tool without pathBrad King2024-01-0313-13/+13
| | | | | | | | | | | | | | | | | | | | Some compiler drivers invoke the linker tool as just `ld`, with no path, expecting it to be in the `PATH`.
| * | | LinkerId: Fix detection of linker tool for Clang on OpenBSDBrad King2024-01-032-2/+2
| | | | | | | | | | | | | | | | Do not match quotes as part of the path.
| * | | LinkerId: Fix detection of linker tool for MSVCBrad King2024-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Previously we matched an entire build system output line and then extracted the relevant portion in a separate brittle step. Match it directly. Use the `CMAKE_LINKER` value directly if available.
| * | | LinkerId: Fix detection of linker tool for GNU on SunOS sparc32Brad King2024-01-034-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | We do not use `-Wl,-v` on SunOS because not all GNU deployments use the `collect2` helper, and those that do do not always print the underlying `ld` command line. Parse the `--with-ld=` option as a fallback.
| * | | LinkerId: Fix detection of linker tool for XL compilersBrad King2024-01-0312-12/+12
| | | | | | | | | | | | | | | | | | | | These compilers print an explicit `export XL_LINKER=` line. Parse it separately.