summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CXXModules/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'cxxmodules-build-export-different-directory-3.28' into ↵Ben Boeckel2024-05-029-0/+141
|\ | | | | | | | | | | | | cxxmodules-build-export-different-directory * cxxmodules-build-export-different-directory-3.28: cmDyndepCollation: look at all `export(TARGETS)` calls
| * cmDyndepCollation: look at all `export(TARGETS)` callsBen Boeckel2024-05-029-0/+141
| | | | | | | | | | | | | | | | | | Previously, only `export()` calls in the same directory were noticed. Also add a test that exports in a different directory than the target itself resides in. Fixes: #25813
* | Tests/CXXModules: test exporting modules which include headersBen Boeckel2024-04-279-0/+176
|/ | | | | Test that headers that are part of the same target are available to modules in the target itself.
* Tests/CXXModules: add a test using `TARGET_OBJECTS` from modulesBen Boeckel2024-03-063-0/+41
| | | | See: #25732
* Merge topic 'cxxmodules-no-export-basedirs-as-include-paths' into release-3.28Brad King2024-02-296-0/+145
|\ | | | | | | | | | | | | 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-286-0/+145
| |
* | Tests/RunCMake/CXXModules: Update VS circular error messageBrad King2024-02-281-1/+1
|/ | | | Match the message expected from MSBuild as of VS 17.9.
* 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-2013-0/+284
|/
* Tests/CXXModules: add a test with transitive targetsBen Boeckel2024-02-1920-0/+299
|
* Tests/CXXModules: add a test importing from a `Ninja` installBen Boeckel2024-02-167-0/+74
| | | | | | | This ensures that consuming from a single configuration generator works in all generators. See: #25568
* Merge topic 'cxxmodules-collation-restat' into release-3.28Brad King2024-02-166-2/+56
|\ | | | | | | | | | | | | | | 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-156-2/+56
| | | | | | | | | | | | | | 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-165-0/+54
|\ \ | |/ | | | | | | | | | | | | | | 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-155-0/+54
| |
* | Merge topic 'cxxmodules-depend-on-modmap-file' into release-3.28Brad King2024-02-165-0/+48
|\ \ | |/ | | | | | | | | | | | | | | 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-155-0/+48
| |
* | cmDyndepCollation: collapse full path before looking upBen Boeckel2024-02-143-0/+30
|/ | | | | | | | `cmSourceFile::GetFullPath()` performs a `CollapseFullPath` before storing the path. Match this behavior when looking up paths from the source file set constructions. Fixes: #25614
* cxxmodules: compute link information for C++ module-consuming targetsMatheus Izvekov2024-01-143-0/+19
| | | | | | | | | 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-105-3/+39
|\ | | | | | | | | | | | | | | | | | | 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-063-0/+34
| | | | | | | | | | | | | | Previously, the `ScanSourceForModuleDependencies` flag was not added to the VS project if "nothing" prompted custom flags. See: #25519
* | Tests/CXXModules: add a test with unity build supportBen Boeckel2024-01-056-0/+67
|/ | | | | C++ module-using TUs cannot participate in unity builds. Add a test case for this situation.
* 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
| * Tests/CXXModules: enhance `internal-partitions` testBen Boeckel2023-12-054-1/+17
| | | | | | | | | | | | This test previously did not *require* that the internal partition be specified as a transitive usage because nothing from it was exposed. Plumb through usages such that the internal partitions are required.
| * Tests/CXXModules: import from an internal partitionBen Boeckel2023-12-053-2/+10
| | | | | | | | | | | | It is reported that MSVC doesn't support the `modname=` syntax in its `-reference modname=modname.ifc` for internal partitions. Add a test case.
* | cmCxxModuleMapper: Fix transitive requirements computationnamniav2023-12-0534-1/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CMake may generate incomplete transitive requirements in CMakeFiles/<target>.dir/CXXModules.json and therefore in module mapper for compiler, when source files were listed in CMakeList.txt in a certain order. This commit fixes the problem by correctly tracking unfinished transitive requirements computation of module units. There have been a simple circular test case whose circular dependency was reported by build system. Now with this correct implementation it's reported by CMake generating module mappers. Add two test cases for transitive requirements computation, one with adding source files in hardcoded order, and the other in randomized order. Fixes: #25465
* | Tests/CXXModules: add a test which scans a PCH-using sourceBen Boeckel2023-12-043-0/+22
|/ | | | This tests that PCH usage works with scanning logic.
* Clang-CXX: copy into the dyndep output on successBen Boeckel2023-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | When `clang-scan-deps` fails to scan (e.g., bad source syntax, junk flags, etc.), the redirection unconditionally updates the file. If this fails, the `.ddi` file timestamp is updated. If the state is then reverted (e.g., the command line returns to the state of the last successful build), the updated file is not useful, but `ninja` does not rerun because: - the command hash matches the last successful run - the output file is newer than its inputs However, since the `.ddi` file has been updated with bogus contents from a failed scan, collation fails as the `rules` array is empty (or incomplete from a batch scan). If `clang-scan-deps` were properly aware of its output file, it could use this to not write the file if any inner scan fails. Requested in https://github.com/llvm/llvm-project/issues/72875. See: https://github.com/llvm/llvm-project/issues/72875 Fixes: #25429
* cmNinjaTargetGenerator: do not order-depend on C++ module sourcesBen Boeckel2023-10-205-0/+52
| | | | | | | | | C++ module sources should not be included by any other TUs, so their presence cannot matter for order-only dependencies of the entire target. Exclude them. Update CMP0154 to take this into consideration and add tests to the `CXXModules` suite (which already deals with module support detection).
* cxxmodules: include `INCLUDES DESTINATION` directoriesBen Boeckel2023-10-166-4/+29
| | | | | | | These paths are added outside the normal property management mechanisms. Shuttle the value to the C++ module export as needed. Fixes: #25289
* Tests/RunCMake/CXXModules: remove experimental settingsBen Boeckel2023-10-072-4/+0
| | | | | Logical conflicts between the topic that introduced the tests and the removal of the experimental flag completely.
* cxxmodules: scan C++ sources for imports by defaultBen Boeckel2023-10-0238-38/+38
| | | | | Existing projects are not using C++ modules in their sources, so introduce policy CMP0155 to enable scanning by default.
* Tests/RunCMake/CXXModules: remove rules file requirementBen Boeckel2023-10-021-12/+2
| | | | | Only Clang needs to disable extensions in order to work; other implementations work as-is.
* CXXModules: remove `EXPERIMENTAL` from C++ module variable namesBen Boeckel2023-10-021-2/+2
|
* cmExperimental: remove the flag for C++ modulesBen Boeckel2023-10-0246-190/+0
| | | | | | | All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
* Tests/CXXModules: add tests for modules with include requirementsBen Boeckel2023-09-2622-0/+284
|
* Tests/CXXModules: relax line number matching in stderrBen Boeckel2023-09-2627-39/+39
|
* cmExperimental: recycle the C++ modules API UUIDBen Boeckel2023-08-179-9/+9
| | | | Supporting modules on IMPORTED targets is worth an update.
* Tests/RunCMake/CXXModules: add tests which use modules from imported targetsBen Boeckel2023-08-1710-0/+76
|
* cmExportFileGenerator: export private compile info for C++ modulesBen Boeckel2023-08-1712-0/+410
| | | | | | | | | When consuming exported targets which contain C++ modules, the consuming project must be able to recompile BMI files using the original target's flags. This is because a module source may use some private target usage requirement but not want to propagate it to consumers. To facilitate this, export the private information as necessary for consumers to be able to perform the BMI compilations.
* Tests/RunCMake/CXXModules: actually generate the source at build timeBen Boeckel2023-08-072-5/+9
| | | | | This tests what is intended to be tested (sources that do not exist until after the configure has run).
* cmExperimental: recycle the C++ modules API UUIDBen Boeckel2023-07-317-7/+7
| | | | `try_compile` and `try_run` now support C++ modules.
* cmCoreTryCompile: use the source type context for source filesBen Boeckel2023-07-318-0/+74
| | | | | | | Also add a test to `RunCMake/CXXModules` to test `try_compile` with C++ modules. Fixes: #25097
* Merge topic 'dyndep-module-info-objlib-dependency'Brad King2023-07-244-0/+38
|\ | | | | | | | | | | | | | | | | | | b665966933 cmComputeLinkInformation: track OBJECT library dependencies a99b87a628 Tests/RunCMake/CXXModules: add a test for issue #25112 2870a67540 Tests/FortranOnly: add a test case for issue #25112 Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8645
| * Tests/RunCMake/CXXModules: add a test for issue #25112Ben Boeckel2023-07-224-0/+38
| | | | | | | | | | Add a test case for C++ `OBJECT` libraries providing modules to consumers.
* | cmExperimental: refresh the C++ modules UUIDBen Boeckel2023-07-137-7/+7
| | | | | | | | | | The transitive support for Clang is a change in support for the ecosystem.
* | Tests/RunCMake/CXXModules: require transitive usagesBen Boeckel2023-07-132-1/+9
|/ | | | | | Clang 17 is in a transition where it warns about transitive usages. Turn it into an error if the flag is available to make sure we're testing the feature properly.