diff options
author | Brad King <brad.king@kitware.com> | 2024-02-16 14:41:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-02-16 14:41:20 (GMT) |
commit | 0e60e84d352d5fdf303841391ed203de886574b5 (patch) | |
tree | b8330981cb89e4da23c515ca6d261c34881a4d84 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 273463aaa99f4a6d046b76c29f86c4bbd61dbb6e (diff) | |
parent | 3f8a59a05c7d2c65020bd2a756d2c6d5a196bec2 (diff) | |
download | CMake-0e60e84d352d5fdf303841391ed203de886574b5.zip CMake-0e60e84d352d5fdf303841391ed203de886574b5.tar.gz CMake-0e60e84d352d5fdf303841391ed203de886574b5.tar.bz2 |
Merge topic 'cxxmodules-dyndep-error-on-private-usage' into release-3.29
3f8a59a05c cxxmodules: return failure from the collator when private usage is found
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9257
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index a3f20c3..f018a8c 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -2742,7 +2742,9 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( // Insert information about the current target's modules. if (modmap_fmt) { - auto cycle_modules = CxxModuleUsageSeed(locs, objects, usages); + bool private_usage_found = false; + auto cycle_modules = + CxxModuleUsageSeed(locs, objects, usages, private_usage_found); if (!cycle_modules.empty()) { cmSystemTools::Error( cmStrCat("Circular dependency detected in the C++ module import " @@ -2750,6 +2752,10 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile( cmJoin(cycle_modules, R"(", ")"_s), '"')); return false; } + if (private_usage_found) { + // Already errored in the function. + return false; + } } cmNinjaBuild build("dyndep"); |