mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
Tests/CXXModules: enhance internal-partitions test
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.
This commit is contained in:
@@ -3,6 +3,12 @@ import :internal_partition;
|
||||
|
||||
#include "internal-partitions_export.h"
|
||||
|
||||
export struct module_struct
|
||||
{
|
||||
private:
|
||||
partition_struct p;
|
||||
};
|
||||
|
||||
export INTERNAL_PARTITIONS_EXPORT int from_import()
|
||||
{
|
||||
return from_partition();
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
export module internal;
|
||||
|
||||
export struct internal_struct
|
||||
{
|
||||
int x;
|
||||
};
|
||||
|
||||
export int from_internal()
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -2,5 +2,5 @@ import importable;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
return from_import();
|
||||
return from_import() * sizeof(module_struct);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
module importable:internal_partition;
|
||||
import internal;
|
||||
|
||||
struct partition_struct
|
||||
{
|
||||
internal_struct i;
|
||||
};
|
||||
|
||||
int from_partition()
|
||||
{
|
||||
return from_internal();
|
||||
|
||||
Reference in New Issue
Block a user