mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
Tests/CXXModules: import from an internal partition
It is reported that MSVC doesn't support the `modname=` syntax in its `-reference modname=modname.ifc` for internal partitions. Add a test case.
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)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export module internal;
|
||||
|
||||
export int from_internal()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
module importable:internal_partition;
|
||||
import internal;
|
||||
|
||||
int from_partition()
|
||||
{
|
||||
return 0;
|
||||
return from_internal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user