mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
Merge topic 'cxxmodules-msvc-corner-cases'
e63983956dTests/CXXModules: enhance `internal-partitions` test8a658fb9ecTests/CXXModules: import from an internal partition Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9039
This commit is contained in:
@@ -19,7 +19,8 @@ target_sources(internal-partitions
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
FILES
|
||||
importable.cxx
|
||||
partition.cxx)
|
||||
partition.cxx
|
||||
internal.cxx)
|
||||
target_compile_features(internal-partitions PUBLIC cxx_std_20)
|
||||
|
||||
add_executable(exe)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
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,12 @@
|
||||
module importable:internal_partition;
|
||||
import internal;
|
||||
|
||||
struct partition_struct
|
||||
{
|
||||
internal_struct i;
|
||||
};
|
||||
|
||||
int from_partition()
|
||||
{
|
||||
return 0;
|
||||
return from_internal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user