summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CXXModules/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* Ninja: include module mapper flags in `compile_commands.json`Ben Boeckel2023-07-095-0/+61
| | | | Fixes: #24618
* VS: Fix C++ modules in source files with the same nameBrad King2023-06-285-0/+41
| | | | | | | | | When multiple source files in a single target have the same name, we already set `ObjectFileName` explicitly to avoid a `.obj` collision. For C++ module sources, set `Module{Output,Dependencies}File` to avoid `.ifc` and `.module.json` collisions. Fixes: #25038
* cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variableBen Boeckel2023-06-0120-100/+0
| | | | It is now subsumed by the UUID setting completely.
* cxxmodules: update the experimental UUIDBen Boeckel2023-05-317-7/+7
| | | | | Syntactic support for C++ header units has been removed, so a new UUID is warranted.
* cxxmodules: Fix exported path to installed module sources in subdirsTyler2023-05-2318-6/+64
| | | | | | | | When generating the `IMPORTED_CXX_MODULES_[CONFIG]` target property, there was a missing path separator after a non-empty relative directory part of the path to a module source file. Co-authored-by: Brad King <brad.king@kitware.com>
* cxxmodules: Do not expect collator install scripts with no CXX_MODULESTyler2023-05-2312-6/+36
| | | | | | | | | | | | Calling `install(EXPORT)` with the `CXX_MODULES_DIRECTORY` parameter leads to installation rules being generated which `include()` CMake scripts that set the `IMPORTED_CXX_MODULES_[CONFIG]` target property for relevant targets. However, these scripts don't get generated for targets in an export set which don't have any C++20 modules. When the installation rules attempt to `include()` the missing scripts, the install fails. Co-authored-by: Brad King <brad.king@kitware.com>
* Tests: Improve RunCMake.CXXModules expectation matching and error reportingBrad King2023-05-2312-32/+78
|
* Tests/CXXModules: add example for private modules between targetsBen Boeckel2023-05-187-0/+36
| | | | Adapted from the example in issue #24652 by Ivan Garramona.
* Tests/RunCMake/CXXModules: declare `forwarding` as `extern "C++"`Ben Boeckel2023-02-036-0/+12
| | | | It is not part of any module, so it needs to be declared as such.
* Tests/RunCMake/CXXModules: add tests which don't export C++ module propertiesBen Boeckel2023-01-2716-14/+249
| | | | | | | 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.
* Revise C++ coding style using clang-format-15Kitware Robot2023-01-184-4/+4
| | | | | | | | | | | | | | 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
* cxxmodules: support new round of Clang patchesBen Boeckel2022-12-155-5/+5
| | | | | | | | | | 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 'cxx-module-map-clang'Brad King2022-12-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 2c558cfd1b gitlab-ci: add CI jobs for Clang with C++20 modules abd42e9cfc ci: add a Docker container for clang support of C++20 modules 51093f3002 Clang-FindBinUtils: also find `clang-scan-deps` 0b333de923 ci: add C++ module rules file for Clang 21b9fb1e8c cmCxxModuleMapper: support the `clang` module map format 9c66224668 cmNinjaTargetGenerator: skip setting `depfile` for `none` scantypes 9123a0991f cmNinjaTargetGenerator: use `.clear()` to empty out some strings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Cristian Adam <cristian.adam@gmail.com> Merge-request: !7978
| * cmCxxModuleMapper: support the `clang` module map formatBen Boeckel2022-12-021-1/+1
| |
* | cmExperimental: recycle C++20 module support UUIDBen Boeckel2022-12-015-5/+5
| | | | | | | | Visual Studio support warrants a new ID.
* | Tests/RunCMake/CXXModules: catch VS circular error messageBen Boeckel2022-12-011-1/+1
| |
* | Tests/RunCMake/CXXModules: mask scanning checks without controlBen Boeckel2022-12-017-21/+38
|/ | | | | In Visual Studio, there is no mechanism to tell scanning apart from non-scanning, so skip the sanity checks.
* cxxmodules: add properties to control scanningBen Boeckel2022-11-187-0/+124
| | | | | | The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for targets and for source files rather than assuming "C++20 always needs to be scanned".
* Tests/RunCMake/CXXModules: add a test with duplicate modulesBen Boeckel2022-10-114-0/+65
| | | | | | Not in the same executable (as that is IFNDR), but in the same project. This tests to make sure that there's not some project-wide cache that gets confused.
* Tests/RunCMake/CXXModules: add a test with circular importsBen Boeckel2022-10-116-0/+38
| | | | | | The build should fail. However, the error message is completely generator-dependent as it is the build tool which (should) eventually detect this case.
* RunCMake/CXXModules: add a "deep-chain" testBen Boeckel2022-08-028-0/+115
| | | | | This tests that transitive usages are propogated properly across long import chains between targets.
* RunCMake/CXXModules: support MSVC extensionsBen Boeckel2022-08-021-1/+1
|
* RunCMake/CXXModules: fix partition importing syntaxBen Boeckel2022-07-262-2/+2
| | | | Apparently GCC accepts the ill-formed prior syntax.
* RunCMake/CXXModules: test public modules requiring private modulesBen Boeckel2022-07-066-0/+47
|
* RunCMake/CXXModules: add tests which export BMIsBen Boeckel2022-07-0624-0/+468
|
* RunCMake/CXXModules: test installation of BMIs and interfacesBen Boeckel2022-07-0610-0/+142
|
* cmExperimental: update `CXX_MODULE_CMAKE_API` UUIDBen Boeckel2022-07-061-1/+1
| | | | The set of features available has been expanded, so update the UUID.
* Tests/RunCMake/CXXModules: add module-using examplesBen Boeckel2022-06-1624-0/+286
This includes a number of examples that should work for various levels of support in a compiler. There are a number of tests which are gated on various features in the compilers. To enable the tests, set `CMake_TEST_MODULE_COMPILATION` to a comma-separated (to avoid `;`-escaping problems) to the list of features which are supported: - `named`: Named modules are supported. - `shared`: Shared libraries with module usage at the API boundary are supported. - `partitions`: Named module partitions are supported. - `internal_partitions`: Named module internal partitions are supported. Additionally, a `CMake_TEST_MODULE_COMPILATION_RULES` file must be passed which contains the rules for how to build modules using the provided compiler. It will be included in the tests to provide these rules. To verify that the file provided works as intended, it must set `CMake_TEST_CXXModules_UUID` to a specific version to indicate that it is an expected file.