diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-06-14 19:30:42 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-06-16 14:28:34 (GMT) |
commit | 8c5a53096ab596aa77623b19d94d9b84046213cc (patch) | |
tree | 348842f906f5063babcdae21bc86872a7ffdbc92 /Tests/RunCMake/CXXModules/examples/library/main.cxx | |
parent | 4151547e2ffa45b50439f071353955e4566e0571 (diff) | |
download | CMake-8c5a53096ab596aa77623b19d94d9b84046213cc.zip CMake-8c5a53096ab596aa77623b19d94d9b84046213cc.tar.gz CMake-8c5a53096ab596aa77623b19d94d9b84046213cc.tar.bz2 |
Tests/RunCMake/CXXModules: add module-using examples
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.
Diffstat (limited to 'Tests/RunCMake/CXXModules/examples/library/main.cxx')
-rw-r--r-- | Tests/RunCMake/CXXModules/examples/library/main.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/examples/library/main.cxx b/Tests/RunCMake/CXXModules/examples/library/main.cxx new file mode 100644 index 0000000..feb38d2 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/library/main.cxx @@ -0,0 +1,6 @@ +import importable; + +int main(int argc, char* argv[]) +{ + return from_import(); +} |