summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Tests/RunCMake/CXXModules: add tests which don't export C++ module propertiesBen Boeckel2023-01-2717-14/+251
| | | | | | | The existing `export-interfaces-{build,install}` tests were actually doing this, but make those test exporting the interfaces and copy the existing tests to tests which explicitly test the "no properties" condition.
* Ninja: require Ninja 1.11 for C++ module supportBen Boeckel2023-01-232-2/+2
| | | | | See: https://gitlab.kitware.com/cmake/cmake/-/issues/18355#note_1296721 See: https://github.com/ninja-build/ninja/pull/1937
* Merge topic 'genex-CONFIG-validate-all'Brad King2023-01-233-1/+10
|\ | | | | | | | | | | | | | | | | 910ada1a88 Genex: $<CONFIG:> syntax of all entries checked 42e417ad12 GeneratorExpression Tests: Remove duplicate test entry Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8082
| * Genex: $<CONFIG:> syntax of all entries checkedRobert Maynard2023-01-202-0/+10
| | | | | | | | Fixes #24327
| * GeneratorExpression Tests: Remove duplicate test entryRobert Maynard2023-01-171-1/+0
| |
* | Merge topic 'try_compile-verbose'Brad King2023-01-234-1/+25
|\ \ | | | | | | | | | | | | | | | | | | faa950a155 try_compile: Run native build tool with verbose output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8095
| * | try_compile: Run native build tool with verbose outputBrad King2023-01-204-1/+25
| | | | | | | | | | | | | | | | | | Make the compiler command lines visible in the configure log. Issue: #23200
* | | Merge topic 'configure-log'Brad King2023-01-205-14/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 317aac14ef cmake: Stop pointing users at logs on configure errors eae1398d09 cmake --system-information: Stop dumping CMake{Output,Error}.log Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8094
| * | | cmake: Stop pointing users at logs on configure errorsBrad King2023-01-195-14/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 18e1bfbb3c (cmake: On configure error suggest looking at CMake*.log files, 2013-07-09, v2.8.12~210^2), when configuring a project fails, we print `See also .../CMake{Output,Error}.log` near the end of the output. This was intended to help users find failures in system and compiler inspection checks, but for normal project errors the messages may be misleading. The logs may contain incidental errors that are part of normal operation and do not need to be addressed by the user. Since commit f6ed2585e5 (Modules: Record system inspection steps in the configure log, 2023-01-16), CMake's builtin modules no longer log information to the old-style `CMake{Output,Error}.log` files anyway, so stop mentioning them. Fixes: #22131 Issue: #23200
* | | Merge topic 'ninja-swift-exported-executables'Brad King2023-01-205-1/+27
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 4165eb3d0b Ninja: Emit swiftmodule from executable with exports Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8048
| * | | Ninja: Emit swiftmodule from executable with exportsEvan Wilde2023-01-195-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for tracking the swiftmodules for executables exporting symbols. This fixes a bug in the earlier implementation around emitting the swiftmodule. Previously, the code would use `CMAKE_EXE_EXPORTS_Swift_FLAG` to inject the `-emit-module`, and module path information into the `CMAKE_Swift_LINK_EXECUTABLE` rule. Because Swift skips the build step and only runs during the link phase, these flags were injected in `cmNinjaNormalTargetGenerator::ComputeLinkCmd` instead of `cmLocalGenerator::GetTargetFlags` where it is done normally. Unfortunately, injecting in `ComputeLinkCmd` didn't do anything because we have a `linkCmd` so `ComputeLinkCmd` exits early, before the EXE_EXPORT flags get added to the link command. Instead of playing with that flag, CMake checks `CMAKE_Swift_LINK_EXECUTABLE_WITH_EXPORTS` and uses that as the link rule if it exists and falls back on `CMAKE_Swift_LINK_EXECUTABLE`. I've defined that variable in terms of `CMAKE_Swift_LINK_EXECUTABLE` with the necessary additional flags for emitting the swift module instead. This has the same end effect as the desired behavior, but simplifies things a bit. Since we're generating the swiftmodule for executables with exports, I've also updated the dependency graph to include the swiftmodule as an output in the build dependency graph if the executable has exports. Tests updated: - RunCMake/NoWorkToDo: Ensure that the build graph does not result in unnecessary rebuilds with exporting executables. - SwiftOnly: Ensure that we can consume functions defined in the executable by a library getting linked into said executable.
* | | | Merge topic 'print-configure-generate-time'Brad King2023-01-209-18/+18
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 5f0c5ec49b cmake: Print configure/generate time Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8083
| * | | cmake: Print configure/generate timeKyle Edwards2023-01-199-18/+18
| | |/ | |/|
* | | Merge topic 'configure-log'Brad King2023-01-1912-27/+106
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f6ed2585e5 Modules: Record system inspection steps in the configure log 0f688386ea Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.log ecc26f98eb UsewxWidgets: Remove leftover debugging code 874c2e1198 FindQt4: Drop outdated advice to look at CMakeError.log on failure a80465bcad GHS: Drop debugging message from log 9199449687 CompileFeatures: Warn explicitly when feature detection binary is not found 24ccc8c3c9 CompilerId: Restore logging of failed identifications 95976514f6 Tests: Avoid using CMake{Output,Error}.log files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8089
| * | | Modules: Record system inspection steps in the configure logBrad King2023-01-186-10/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging with calls to `message(CONFIGURE_LOG)` to record the steps in the `CMakeConfigureLog.yaml` configure log instead. Issue: #23200
| * | | Tests: Avoid using CMake{Output,Error}.log filesBrad King2023-01-186-17/+35
| | | | | | | | | | | | | | | | These log files will soon go away, so avoid using them in tests.
* | | | Merge topic 'optimize-full-name-function'Brad King2023-01-191-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a525f5f1bf cmGeneratorTarget: Cache full name components Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8033
| * | | | cmGeneratorTarget: Cache full name componentsPierre Testart2023-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Cache the result of cmGeneratorTarget::GetFullNameInternalComponents to improve performance.
* | | | | Revise C++ coding style using clang-format-15Kitware Robot2023-01-1841-54/+66
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 15. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Fixes: #24315
* | | | Merge topic 'configure-log'Brad King2023-01-188-1/+50
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a78cba5197 message: Add CONFIGURE_LOG mode to record a message in the configure log 645671d36f Help: Document configure log behavior in try_compile and try_run Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8080
| * | | | message: Add CONFIGURE_LOG mode to record a message in the configure logBrad King2023-01-188-1/+50
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Provide a replacement for `file(APPEND .../CMake{Output,Error}.log)` that records messages in the configure log. Issue: #23200
* | | | clang-format.bash: Use generic clang-format attributeBrad King2023-01-186-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Specify the clang-format version in the attribute value instead of its name. Issue: #24315
* | | | Merge topic 'add_visbility_flags_to_device_link_line'Brad King2023-01-186-13/+32
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0c56bdf91e CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET setting Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8065
| * | | | CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET settingRobert Maynard2023-01-166-13/+32
| | |_|/ | |/| | | | | | | | | | Fixes #24272
* | | | Merge topic 'typo-fix'Brad King2023-01-181-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 99614e06be Source: Fix a few typos Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8078
| * | | Source: Fix a few typosVitaly Stakhovsky2023-01-171-1/+1
| | | |
* | | | Merge topic 'configure-log'Brad King2023-01-1716-0/+144
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 48292c8624 try_compile: Record stack of in-progess checks in configure log d4bf7d80c6 try_compile: Add a NO_LOG option to skip recording in the configure log 9d9e8450a8 try_compile: Add optional LOG_DESCRIPTION to record in configure log 65ed5c2ca8 try_compile: Report underlying error when COPY_FILE fails 0418efb7ad Tests: Add explicit ConfigureLog case to RunCMake.try_compile 189557bd74 cmake: Make entire in-progress check stack available internally 96ce3581ab Help: Clarify backtrace order in cmake-configure-log(7) Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8072
| * | | | try_compile: Record stack of in-progess checks in configure logBrad King2023-01-167-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many `try_compile` and `try_run` calls occur inside check modules between `message(CHECK_START)` and `message(CHECK_{PASS,FAIL})` pairs. Add a field to configure log entries to report this context. Issue: #23200
| * | | | try_compile: Add a NO_LOG option to skip recording in the configure logBrad King2023-01-162-0/+10
| | | | |
| * | | | try_compile: Add optional LOG_DESCRIPTION to record in configure logBrad King2023-01-1610-0/+32
| | | | | | | | | | | | | | | | | | | | Issue: #23200
| * | | | Tests: Add explicit ConfigureLog case to RunCMake.try_compileBrad King2023-01-165-0/+60
| |/ / /
* | | | Merge topic 'ctest-no-tests-action-env-var'Brad King2023-01-179-0/+16
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8044
| * | | ctest(1): Add CTEST_NO_TESTS_ACTION env varfriendlyanon2023-01-139-0/+16
| |/ / | | | | | | | | | | | | This environment variable provides a default value for the --no-tests=<action> command line argument.
* | | Merge topic 'vs-masm-flags'Brad King2023-01-132-0/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 81f670fa83 VS: Honor compile options for MASM Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8068
| * | | VS: Honor compile options for MASMBrad King2023-01-122-0/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | The Ninja and Makefile generators honor `target_compile_options` and friends for MASM `.asm` sources. Teach the VS generator to honor them too for consistency. Fixes: #24289
* | | Merge topic 'fea/add-copy_directory_if_different'Brad King2023-01-131-0/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | c1170b5602 cmake: Add -E copy_directory_if_different Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8059
| * | | cmake: Add -E copy_directory_if_differentRobert Maynard2023-01-121-0/+9
| |/ / | | | | | | | | | Fixes #21584
* | | Merge topic 'try_run-cross-compile'Brad King2023-01-132-0/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5cd5c8cac5 Merge branch 'backport-try_run-cross-compile' into try_run-cross-compile 0191e8b512 try_run: Do not require unrequested stdout/stderr when cross-compiling 2f85ec0a37 try_run: Avoid crash in keyword-dispatched signature when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8066
| * \ \ Merge branch 'backport-try_run-cross-compile' into try_run-cross-compileBrad King2023-01-122-0/+10
| |\ \ \ | | |/ / | |/| |
| | * | try_run: Avoid crash in keyword-dispatched signature when cross-compilingBrad King2023-01-122-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02, v3.25.0-rc1~178^2) the `DoNotRunExecutable` code path may be reached with no single source-file argument. Do not assume it exists. Fixes: #24295
* | | | Merge topic 'implicit-includes'Brad King2023-01-132-4/+4
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 607bccb4ef Restore implicit include directory extraction for adaptive relative paths Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8067
| * | | Restore implicit include directory extraction for adaptive relative pathsBrad King2023-01-122-4/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the logic added by commit ef41d49812 (Fix implicit include directory extraction for adaptive relative paths, 2019-04-08, v3.14.2~5^2) to account for the new `try_compile` work directory used for the ABI check since commit 2edf0fc6d7 (Modules: Use new keyword-dispatched try_compile signature, 2022-09-13, v3.25.0-rc1~144^2). Paths relative to the work directory will now have one more `../` in them, so update the test data to match. Fixes: #24279
| * | Merge branch 'test-git-local-defaultBranch' into release-3.25Brad King2023-01-111-1/+1
| |\ \ | | | | | | | | | | | | Merge-request: !8060
| | * | Tests: Fix CTest.UpdateGIT under repo-local defaultBranch configBrad King2023-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default branch detection added by commit 26ec2e2b0c (Tests: Update CTest.UpdateGIT test for custom defaultBranch, 2020-12-02, v3.20.0-rc1~355^2) fails if the test is run inside a Git work tree whose `.git` directory configures a `defaultBranch` that is different from the global or system-wide value. Fix the detection to ignore the locally configured value so that we match the `git init` decision.
* | | | FileAPI: Add "configureLog" object kindBrad King2022-12-1710-1/+64
| |_|/ |/| | | | | | | | | | | | | | | | | Provide clients with a way to get a known set of configure log event versions. Issue: #23200
* | | Merge topic 'cxxmodules-clang-update'Brad King2022-12-178-8/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5dc17d0a7a gitlab-ci: update to new Clang CI image for C++ modules e84fcbcb0b cxxmodules: support new round of Clang patches 5e35913382 ci: update `llvm` snapshot to newest patch revisions Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8019
| * | | cxxmodules: support new round of Clang patchesBen Boeckel2022-12-158-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These patches now support the `-MF` output, so remove the `none` support added just for the old patchset which did not use it. Also update the flag name to `-fmodule-output=`. Due to the new Clang module mapper flag, use a new experimental support UUID as well.
* | | | Merge topic 'configure-log'Brad King2022-12-178-31/+195
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c40e0b25e ConfigureLog: Version individual events instead of the whole log 048a02d5bb ConfigureLog: Log try_compile and try_run checks 746c776caf ConfigureLog: Add infrastructure for structured configure event logging e8b8d82cbf Tests: Generalize RunCMake expectation component names 8d29a0bda6 cmTryRunCommand: Factor out stdout/stderr capture conditions fdda4095a3 cmCoreTryCompile: Return more semantic information from compile step Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8017
| * | | | ConfigureLog: Version individual events instead of the whole logBrad King2022-12-162-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support multiple log versions without buffering the entire log, move versioning to the level of individual events. Multiple versions of an event may then be logged consecutively. Issue: #23200
| * | | | ConfigureLog: Log try_compile and try_run checksMatthew Woehlke2022-12-167-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add configure log events for `try_compile` and `try_run` results. Issue: #23200