|
23 | 23 | # |
24 | 24 | # ⚠️ STATUS: CONFIGURES AND COMPILES xlings' OWN 110 UNITS; DOES NOT LINK. |
25 | 25 | # |
26 | | -# The blocker is not modules — it is dependency resolution, and it is worth |
27 | | -# stating because it is the honest limit of a hand-written foreign description: |
| 26 | +# The dependencies themselves describe fine — every header one of them needs is |
| 27 | +# unpacked in mcpp's registry and the list below finds all of them, transitively |
| 28 | +# (mbedtls arrives via mcpplibs tinyhttps, lua via capi.lua). |
28 | 29 | # |
29 | | -# xlings declares 6 direct dependencies. Four ship source (mcpplibs cmdline / |
30 | | -# xpkg / tinyhttps / capi.lua) and two ship source trees that mcpp builds |
31 | | -# (ftxui, libarchive). Wiring those four in surfaced THEIR dependencies: |
| 30 | +# The blocker is one level past that, and it is specific: |
32 | 31 | # |
33 | | -# tinyhttps/src/tls.cppm:3 fatal error: mbedtls/ssl.h: No such file |
34 | | -# capi.lua/.../lua_headers.h fatal error: lua.h: No such file |
| 32 | +# xpkg-executor.cppm:5 fatal error: unknown compiled module interface: |
| 33 | +# no such module [mcpplibs.xpkg.lua_stdlib] |
35 | 34 | # |
36 | | -# Following that graph to a link means reimplementing mcpp's package manager |
37 | | -# inside a CMakeLists — and a hand-written version of it is stale on the first |
38 | | -# upstream change, silently. |
| 35 | +# `mcpplibs.xpkg.lua_stdlib` is not a checked-in file. It is GENERATED at build |
| 36 | +# time by that package's `build.mcpp` program — mcpp's build-program protocol. |
| 37 | +# No foreign build system can produce it without implementing that protocol, so |
| 38 | +# this is not a gap in the description; it is the boundary of what a description |
| 39 | +# can be. |
39 | 40 | # |
40 | 41 | # So the xlings arm compares **mcpp against mcpp** (releases, schedules), which |
41 | 42 | # is what a control target is for: it answers "does this engine change hold on a |
@@ -160,29 +161,36 @@ xlings_add_source_dep(mcpplibs-x-xpkg 0.0.57) |
160 | 161 | xlings_add_source_dep(mcpplibs-x-tinyhttps 0.2.9) |
161 | 162 | xlings_add_source_dep(mcpplibs.capi-x-lua 0.0.3) |
162 | 163 |
|
163 | | -# ftxui and libarchive arrive as SOURCE trees, unpacked one level below the |
164 | | -# version directory (`compat-x-ftxui/6.1.9/FTXUI-6.1.9/include`, |
165 | | -# `compat-x-libarchive/3.8.7/libarchive-3.8.7/libarchive`) — not as prebuilt |
166 | | -# libraries. Globbing `<ver>/include` finds nothing and the first importer dies |
167 | | -# with `fatal error: ftxui/component/event.hpp: No such file or directory`. |
168 | | -# |
169 | | -# ⚠️ THIS ARM IS INCOMPLETE, and that is stated rather than papered over: mcpp |
170 | | -# BUILDS these two from source through its own package machinery, and |
171 | | -# reproducing that here means compiling ftxui and libarchive with cmake as well. |
172 | | -# Until that is done, this description configures and compiles xlings' own units |
173 | | -# but cannot LINK. The headers are wired so the compile phase — which is what |
174 | | -# the module-graph benchmark measures — is comparable. |
175 | | -foreach(pkg IN ITEMS compat-x-ftxui compat-x-libarchive) |
176 | | - file(GLOB pkgdirs "${MCPP_XPKGS}/${pkg}/*") |
177 | | - foreach(pkgdir IN LISTS pkgdirs) |
178 | | - file(GLOB inner "${pkgdir}/*") |
| 164 | +# Header-providing packages. |
| 165 | +# |
| 166 | +# Each arrives as a SOURCE tree unpacked one level below the version directory — |
| 167 | +# `compat-x-ftxui/6.1.9/FTXUI-6.1.9/include`, |
| 168 | +# `compat-x-lua/5.4.7/lua-5.4.7/src` — so globbing `<ver>/include` finds nothing |
| 169 | +# and the failure surfaces on the first importer rather than on the glob. |
| 170 | +# |
| 171 | +# The list is TRANSITIVE, and it is written out rather than discovered because |
| 172 | +# the discovery is what mcpp's package manager does: xlings names 6 direct |
| 173 | +# dependencies, and wiring the four source ones in surfaced two more |
| 174 | +# (`mbedtls/ssl.h` for tinyhttps, `lua.h` for capi.lua). Naming them keeps this |
| 175 | +# description honest about what it is — a hand-maintained copy of a resolved |
| 176 | +# dependency set, which is exactly why bench/projects/ carries a description |
| 177 | +# only for trees this repository can keep correct. |
| 178 | +set(XLINGS_HEADER_PKGS |
| 179 | + compat-x-ftxui # ftxui/component/event.hpp |
| 180 | + compat-x-libarchive # archive.h |
| 181 | + compat-x-mbedtls # mbedtls/ssl.h (via mcpplibs tinyhttps) |
| 182 | + compat-x-lua) # lua.h (via mcpplibs capi.lua) |
| 183 | + |
| 184 | +foreach(pkg IN LISTS XLINGS_HEADER_PKGS) |
| 185 | + file(GLOB pkgvers "${MCPP_XPKGS}/${pkg}/*") |
| 186 | + foreach(pkgver IN LISTS pkgvers) |
| 187 | + file(GLOB inner "${pkgver}/*") |
179 | 188 | foreach(d IN LISTS inner) |
180 | | - if(IS_DIRECTORY "${d}/include") |
181 | | - target_include_directories(xlings PRIVATE "${d}/include") |
182 | | - endif() |
183 | | - if(IS_DIRECTORY "${d}/libarchive") |
184 | | - target_include_directories(xlings PRIVATE "${d}/libarchive") |
185 | | - endif() |
| 189 | + foreach(sub include src libarchive) |
| 190 | + if(IS_DIRECTORY "${d}/${sub}") |
| 191 | + target_include_directories(xlings PRIVATE "${d}/${sub}") |
| 192 | + endif() |
| 193 | + endforeach() |
186 | 194 | endforeach() |
187 | 195 | endforeach() |
188 | 196 | endforeach() |
|
0 commit comments