summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CXXModules
Commit message (Collapse)AuthorAgeFilesLines
* 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-2617-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
* Revise C++ coding style using clang-format-15Kitware Robot2023-01-189-11/+11
| | | | | | | | | | | | | | 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-156-6/+6
| | | | | | | | | | 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-016-6/+6
| | | | | | | | Visual Studio support warrants a new ID.
* | Tests/RunCMake/CXXModules: add support for Visual StudioBen Boeckel2022-12-012-0/+8
| |
* | Tests/RunCMake/CXXModules: split out collation-requiring testsBen Boeckel2022-12-011-1/+5
| | | | | | | | | | Visual Studio does not currently have a place to insert the logic required to implement this test, so skip it if possible.
* | Tests/RunCMake/CXXModules: factor out generator support detectionBen Boeckel2022-12-011-3/+8
| | | | | | | | This keeps the condition to a readable limit.
* | Tests/RunCMake/CXXModules: update `NoDyndepSupport` for VS2019 and olderBen Boeckel2022-12-011-0/+5
| |
* | 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.
* Tests/RunCMake/CXXModules: mark IMPORTED targets as INTERFACEBen Boeckel2022-11-212-2/+2
| | | | | | Now that `Ninja` generators will know to generate rules for `IMPORTED` targets, mark these as `INTERFACE` to avoid requirements of actual artifacts.
* cxxmodules: add properties to control scanningBen Boeckel2022-11-188-0/+125
| | | | | | 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".
* Merge topic 'msvc-19.34-cpp-modules'Brad King2022-11-142-1/+3
|\ | | | | | | | | | | | | | | 0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7745
| * msvc: bless MSVC 19.34 support for C++ modules as experimentalBen Boeckel2022-11-112-1/+3
| | | | | | | | Visual Studio 17.4 now contains official support for what CMake needs.
* | Tests/RunCMake/CXXModules: add a test with duplicate modulesBen Boeckel2022-10-115-0/+66
| | | | | | | | | | | | 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-117-1/+44
|/ | | | | | 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-029-0/+116
| | | | | 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-067-0/+48
|
* RunCMake/CXXModules: add tests which export BMIsBen Boeckel2022-07-0625-0/+479
|
* RunCMake/CXXModules: test installation of BMIs and interfacesBen Boeckel2022-07-0611-0/+161
|
* RunCMake/CXXModules: fix example follow-on case namesBen Boeckel2022-07-061-2/+2
|
* RunCMake/CXXModules: output example test output upon failureBen Boeckel2022-07-061-1/+1
|
* RunCMake/CXXModules: append to the test optionsBen Boeckel2022-07-061-1/+1
|
* cmNinjaTargetGenerator: write out BMI install information for the collatorBen Boeckel2022-07-0610-0/+216
|
* cmNinjaTargetGenerator: write out export information for the collatorBen Boeckel2022-07-068-0/+277
| | | | | The collator will use this to know where the target's export information needs to go so that module properties may be provided.
* cmNinjaTargetGenerator: write out fileset information for the collatorBen Boeckel2022-07-066-0/+188
| | | | | The collator will use this to generate property settings for the imported targets in the build and install export sets.
* Tests/RunCMake/CXXModules: add a json comparison scriptBen Boeckel2022-07-061-0/+160
|
* cmExperimental: update `CXX_MODULE_CMAKE_API` UUIDBen Boeckel2022-07-062-2/+2
| | | | The set of features available has been expanded, so update the UUID.
* cmExport*FileGenerator: support exporting C++ module propertiesBen Boeckel2022-07-067-0/+144
| | | | | C++ module properties will be generated at build time, so generate code that includes the files actually responsible for the information.
* install: support `CXX_MODULES_BMI` installation bitsBen Boeckel2022-07-0611-0/+116
|
* cmTargetSourcesCommand: allow `INTERFACE` C++ modules when importedBen Boeckel2022-07-065-0/+29
| | | | | `PUBLIC` filesets become `INTERFACE` upon installation. Allow `INTERFACE` scopes for C++ modules when the target is imported.
* RunCMake/CXXModules/NoCXX20: Force older standardRaul Tambre2022-06-281-3/+4
| | | | | | | | | | Compile features ensure a compiler is aware of a standard version, but the one actually used may be newer. The test relies on the standard chosen being pre-C++20, so force C++17 explicitly. This was exposed by a nightly bot that has a compiler defaulting to C++23. The test would've broken anyway in a few years once GCC or Clang upped their default.
* Tests/RunCMake/CXXModules: add module-using examplesBen Boeckel2022-06-1625-0/+339
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-1645-0/+506
C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).