summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx
diff options
context:
space:
mode:
authornamniav <namniav@gmail.com>2023-12-04 04:28:33 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-05 15:26:10 (GMT)
commite9b0dcbbfa51e26f0516c81d7ed3d4051cb539c0 (patch)
treedcf1d8102a5d7ea5a288fa8e2963bbc2c94d0056 /Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx
parent3e8f0211378664665abc5e09503296eb4825b50a (diff)
downloadCMake-e9b0dcbbfa51e26f0516c81d7ed3d4051cb539c0.zip
CMake-e9b0dcbbfa51e26f0516c81d7ed3d4051cb539c0.tar.gz
CMake-e9b0dcbbfa51e26f0516c81d7ed3d4051cb539c0.tar.bz2
cmCxxModuleMapper: Fix transitive requirements computation
Previously CMake may generate incomplete transitive requirements in CMakeFiles/<target>.dir/CXXModules.json and therefore in module mapper for compiler, when source files were listed in CMakeList.txt in a certain order. This commit fixes the problem by correctly tracking unfinished transitive requirements computation of module units. There have been a simple circular test case whose circular dependency was reported by build system. Now with this correct implementation it's reported by CMake generating module mappers. Add two test cases for transitive requirements computation, one with adding source files in hardcoded order, and the other in randomized order. Fixes: #25465
Diffstat (limited to 'Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx')
-rw-r--r--Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx b/Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx
new file mode 100644
index 0000000..2826717
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/non-trivial-collation-order/partition_level/intf4.cxx
@@ -0,0 +1,8 @@
+export module partition_level:intf4;
+export import :intf3;
+namespace partition_level {
+int intf4()
+{
+ return intf3();
+}
+}