summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Fix Fortran module deps in files INCLUDEd by preprocessed sourcesBrad King2024-03-194-8/+15
| | | | | | | If a preprocessed source also uses the Fortran `INCLUDE` directive, search the original source file's directory. Fixes: #25792
* Autogen: Restore target-ordering dependencies in Makefiles with DEPFILEBrad King2024-03-146-1/+28
| | | | | | | | | | | | | | | | | | In commit aebfbcaa46 (AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14, v3.17.0-rc1~58^2) the `_autogen_timestamp_deps` target was given target ordering dependencies through its custom command rather than direct target dependencies as on the `_autogen` target. Then commit 895fa3433f (cmQtAutoGenInitializer: support IMPLIB-only imported targets, 2021-09-23, v3.22.0-rc1~80^2) converted some target-level dependencies into file-level dependencies on the custom command. This only works with a monolithic build graph like Ninja. Since commit ebc9e448b3 (Autogen: Add depfile support for Makefiles, 2023-09-07, v3.28.0-rc1~101^2~1) we use the `_autogen_timestamp_deps` target in Makefile generators too. This exposed the missing target ordering dependency. Fixes: #25766
* Tests: Update RunCMake.CheckCompilerFlag for Xcode 15.3Brad King2024-03-121-2/+2
| | | | | | Xcode passes a new `-use-frontend-parseable-output` flag to Swift that conflicts with our `-parseable-output` flag. Use a different flag for the test case.
* Tests: Update RunCMake.CompileFeatures for Xcode 15.3Brad King2024-03-122-1/+8
| | | | Xcode no longer puts an extra backslash in its `-std=` flags.
* Tests/CXXModules: add a test using `TARGET_OBJECTS` from modulesBen Boeckel2024-03-064-0/+42
| | | | See: #25732
* Merge topic 'cxxmodules-no-export-basedirs-as-include-paths' into release-3.28Brad King2024-02-297-0/+147
|\ | | | | | | | | | | | | 028f3134e5 cmExportFileGenerator: only export include paths for HEADERS file sets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9295
| * cmExportFileGenerator: only export include paths for HEADERS file setsBen Boeckel2024-02-287-0/+147
| |
* | Tests/RunCMake/CXXModules: Update VS circular error messageBrad King2024-02-281-1/+1
|/ | | | Match the message expected from MSBuild as of VS 17.9.
* Restore support for TARGET_OBJECTS in link interfaces with unity buildsBrad King2024-02-215-0/+36
| | | | | | | | | | | | | This was broken by commit df08c37a42 (cmGlobalGenerator: Add unity/pch sources after computing compile features, 2024-02-02, v3.28.3~1^2~1^2), and 3.28.2's commit 76b5383123 (cmGlobalGenerator: add unity sources after computing target compile features, 2024-01-01, v3.28.2~17^2~1). The problem is very similar to that fixed by commit 4e8f24e977 (PCH: Clear link interface cache when adding PCH object to it, 2022-01-24, v3.23.0-rc1~44^2~9). Generalize that fix. Fixes: #25696
* Tests: Update RunCMake.TargetObjects cmake_minimum_required versionBrad King2024-02-211-1/+1
| | | | | This was missed in commit 1edf138506 (Tests/RunCMake: Update cmake_minimum_required versions, 2023-02-06, v3.27.0-rc1~508^2~1).
* Merge topic 'cxxmodules-transitive-std' into release-3.28Brad King2024-02-212-2/+2
|\ | | | | | | | | | | | | f0df692d21 Tests/CXXModules: test `cxx_std_20` coming from a dependency Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9276
| * Tests/CXXModules: test `cxx_std_20` coming from a dependencyBen Boeckel2024-02-202-2/+2
| | | | | | | | Closes: #25569
* | cmExportFileGenerator: export link libraries as-isBen Boeckel2024-02-204-4/+4
| | | | | | | | | | | | | | This allows for transitive modules to work because `$<COMPILE_ONLY>`-wrapped dependencies do not end up in the `linked-target-dirs` collator property. Test suite exported property tests updated to account for the change.
* | Tests/CXXModules: test transitive modules usageBen Boeckel2024-02-2014-0/+294
|/
* Tests/CXXModules: add a test with transitive targetsBen Boeckel2024-02-1921-0/+307
|
* Tests/CXXModules: add a test importing from a `Ninja` installBen Boeckel2024-02-168-0/+78
| | | | | | | This ensures that consuming from a single configuration generator works in all generators. See: #25568
* Tests/CXXModules: support building a project with `Ninja`Ben Boeckel2024-02-161-0/+29
| | | | This allows testing mixed generator setups.
* Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` itemsBen Boeckel2024-02-161-0/+12
|
* Merge topic 'cxxmodules-collation-restat' into release-3.28Brad King2024-02-167-2/+59
|\ | | | | | | | | | | | | | | a7424b636b Ninja: make the collator rule use `restat = 1` e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9259
| * Tests/CXXModules: add a test to ensure that `restat` works for collationBen Boeckel2024-02-157-2/+59
| | | | | | | | | | | | | | Also update the `modules-json-file` test to account for the fact that `CXXModules.json` is not updated for timestamp-only rebuild triggers. See: #25511
* | Merge topic 'cxxmodules-visibility-change-rebuild' into release-3.28Brad King2024-02-166-0/+55
|\ \ | |/ | | | | | | | | | | | | | | 60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata 52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files 9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9247
| * Tests/CXXModules: test that objects depend on dependent modules json filesBen Boeckel2024-02-156-0/+55
| |
* | Merge topic 'cxxmodules-depend-on-modmap-file' into release-3.28Brad King2024-02-166-0/+62
|\ \ | |/ | | | | | | | | | | | | | | 363300ace5 cxxmodules: depend on the modmap contents 940628d48d Tests/CXXModules: test that objects depend on their modmap files 681ee92030 Tests/CXXModules: support testing rebuild conditions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9248
| * Tests/CXXModules: test that objects depend on their modmap filesBen Boeckel2024-02-156-0/+49
| |
| * Tests/CXXModules: support testing rebuild conditionsBen Boeckel2024-02-141-0/+13
| |
* | Merge topic 'ci-test-CommandLength' into release-3.28Brad King2024-02-161-1/+4
|\ \ | | | | | | | | | | | | | | | | | | edb833d69e Tests/CommandLength: Refactor test commands to reduce test run time Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9256
| * | Tests/CommandLength: Refactor test commands to reduce test run timeBrad King2024-02-151-1/+4
| | | | | | | | | | | | | | | | | | | | | Since 2024-02-09 or so this test frequently times out on a few of our Windows CI runners. Use fewer but longer command lines to achieve a similar total command length. By running fewer commands, the test takes much less time.
* | | Merge topic 'cxxmodules-collapse-source-paths' into release-3.28Brad King2024-02-154-0/+31
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 0f0d853de7 cmDyndepCollation: collapse full path before looking up Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9249
| * | cmDyndepCollation: collapse full path before looking upBen Boeckel2024-02-144-0/+31
| |/ | | | | | | | | | | | | | | `cmSourceFile::GetFullPath()` performs a `CollapseFullPath` before storing the path. Match this behavior when looking up paths from the source file set constructions. Fixes: #25614
* | Tests: Enable visionOS tests with Xcode 15.2Brad King2024-02-092-44/+37
| | | | | | | | | | | | Xcode 15.2 officially includes the visionOS SDKs. Fixes: #25266
* | Tests: Update RunCMake.XcodeProject-Device for visionOS in Xcode 15.1 betaBrad King2024-02-091-2/+2
| | | | | | | | The target identification macros changed since the 15.0 beta.
* | Ninja: Update showIncludes prefix detection for clang-cl 18Martin Storsjö2024-02-075-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit LLVM/Clang commit `5523fefb01c2` ([clang][lex] Use preferred path separator in includer-relative lookup, 2023-09-08), part of the upcoming 18.x release, the output format of the showIncludes flag has changed, where it now prints paths with double backslashes: Note: including file: .\\foo.h Previously, we expected to see the path name in the form "./foo.h". Extend the regex to match a path name starting with `.\`, in addition to the existing matched patterns.
* | Tests/RunCMake/Ninja: Rename showIncludes case for clang-cl <= 17Brad King2024-02-075-5/+5
|/ | | | Make room for a new case for clang-cl 18.
* Merge branch 'unity-after-compile-features' into restore-pch-with-unityBrad King2024-02-023-0/+4
|\ | | | | | | | | | | | | | | | | | | Replace commit 76b5383123 (cmGlobalGenerator: add unity sources after computing target compile features, 2024-01-01, v3.28.2~17^2~1) with an alternative change. This merge commit resolves conflicts such that future `git blame` calls will follow the second parent for the relevant lines and pretend the replaced commit never existed. Fixes: #25650
| * Tests: Add case covering PCH in a unity buildBrad King2024-02-023-0/+4
| | | | | | | | Issue: #25650
* | Autogen: Forward dependencies when both Makefile and DEPFILE are usedOrkun Tokdemir2024-01-286-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | Since commit ebc9e448b3 (Autogen: Add depfile support for Makefiles, 2023-09-07, v3.28.0-rc1~101^2~1) CMake does not generate the correct dependency graph when both `Makefile` and `DEPFILE` are used. The build of `<target_name>_autogen_timestamp_deps` fails due to missing dependencies. To tackle that problem, forward target dependencies to both `<target_name>_autogen_timestamp_deps` and `<target_name>_autogen` instead of just `<target_name>_autogen`. Fixes: #25600
* | Tests: Improve C compatibility of LoadCommand testsFlorian Weimer2024-01-252-11/+17
| | | | | | | | | | | | | | | | The previous code used `char **` and `const char **`` types as if they were the same. But they are distinct types in C, so when passing these pointers as function arguments, their types have to match. Future C compilers will treat this as an error, similar to what C++ compilers do today.
* | cmUVProcessChain: Simplify SetExternalStream usageBrad King2024-01-241-4/+1
| | | | | | | | | | It is commonly called with the `fileno()` of a `FILE*` stream, so accept the latter directly.
* | Tests: Add missing include in testUVProcessChainHelper on WindowsBrad King2024-01-241-0/+4
| | | | | | | | We use `STATUS_ACCESS_VIOLATION` from `windows.h`.
* | cxxmodules: make export trampoline script files uniqueBen Boeckel2024-01-185-11/+73
| | | | | | | | | | | | | | | | | | | | | | Include the name of the `EXPORT` in the filename when generating export information for C++ modules. This allows the same directory to be used for multiple sets of C++ module-using targets. For `export(TARGETS)` uses, generate a name based on the hash of the concatenation of the target names involved with the `export()` call. Fixes: #25609
* | 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
| * | 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' 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
| * | 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.
* | 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
* | HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_languageGergely Meszaros2024-01-043-0/+38
|/ | | | Fixes: #25541
* Ninja: LINK_OPTIONS property should support newlinesMarc Chevrier2023-12-202-0/+9
| | | | Fixes: #25513
* 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