

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# ml-cpp Build System78## CMake Structure910- Top-level `CMakeLists.txt` configures the project, includes `CTest`, detects compiler cache11- `cmake/functions.cmake` defines `ml_add_library`, `ml_add_test_executable`, `ml_add_test`, `ml_install`12- `cmake/variables.cmake` defines compiler flags per platform13- Toolchain files: `cmake/{darwin-aarch64,linux-x86_64,linux-aarch64,windows-x86_64}.cmake`14- `test/CMakeLists.txt` defines test targets: `ml_test`, `test_individually`, `build_tests`, `run_tests`1516## Important: CTest and Target Names1718- `include(CTest)` reserves the `test` target name — custom targets must not use it19- Our monolithic test target is named `ml_test` (not `test`)20- `test_individually` runs tests via CTest with parallel execution2122## Build Acceleration2324### Unity Builds (`-DCMAKE_UNITY_BUILD=ON`)25- Combines multiple source files into single translation units26- Effective on x86_64 (~41% faster), minimal on aarch6427- Conflicts from anonymous-namespace symbols need `SKIP_UNITY_BUILD_INCLUSION`28- Disabled entirely for: `MlMathsTimeSeries`, `MlMathsAnalytics`, `MlApi`, `ml_test_maths_common`, `ml_test_api`2930### Precompiled Headers (`-DML_PCH=ON`)31- Custom option, applied in `cmake/functions.cmake` via `target_precompile_headers()`32- STL headers + `<boost/test/unit_test.hpp>` for test targets33- Do NOT include `<boost/unordered_map.hpp>` — conflicts with `boost/json.hpp` on GCC3435### sccache (GCS Backend)36- `dev-tools/setup_sccache.sh` / `setup_sccache.ps1` — downloads, configures, starts37- GCS bucket: `gs://elastic-ml-cpp-sccache`, per-platform prefix (`linux-x86_64/`, etc.)38- Vault: `secret/ci/elastic-ml-cpp/sccache/gcs_service_account`39- Requires `-DCMAKE_CXX_COMPILER_LAUNCHER=sccache` — top-level CMakeLists.txt respects existing launcher4041### Compiler Launcher Precedence42If `CMAKE_CXX_COMPILER_LAUNCHER` is already set (e.g. sccache), the ccache auto-detection in `CMakeLists.txt` is skipped.4344### MSVC `/Z7` vs `/Zi`45- `/Zi`: Debug info via shared PDB (`mspdbsrv.exe`) — serializes parallel compilation46- `/Z7`: Debug info embedded in `.obj` — fully parallel, sccache-compatible47- We use `/Z7` for all Windows configurations; `/FS` flag removed as unnecessary4849## Gradle Integration5051- `build.gradle` invokes CMake for macOS and Windows builds52- `task test` calls `cmake --build ... -t ml_test`53- `task check` depends on `test`54- `testParallel` formula: `numCpus <= 4 ? 2 : Math.ceil(numCpus / 2.0)` (Unix), `2` (Windows)55- Environment `CMAKE_FLAGS` are appended to Gradle's internal cmake flags (stripping duplicate toolchain)5657## Docker Builds (Linux)5859- `dev-tools/docker/docker_entrypoint.sh` — main build/test script inside containers60- `dev-tools/docker_build.sh` / `docker_test.sh` — host orchestration61- Linux aarch64 builds run in Docker; x86_64 runs `docker_entrypoint.sh` directly62- cgroup-aware CPU detection: check `/sys/fs/cgroup/cpu.max` (cgroups v2) or `/sys/fs/cgroup/cpu/cpu.cfs_{quota,period}_us` (v1)63- `ZIP_COMPRESSION_LEVEL`: 1 for PR/debug builds, 9 for release branches6465## Test Parallelism6667- Test parallelism formula: `numCpus <= 4 ? 2 : ceil(numCpus / 2)`68- CKMostCorrelatedTest/testScale is CPU-time-sensitive — keep parallelism conservative on low-core machines69- Each test suite internally uses `ctest --parallel <cpus>` for individual test case parallelism70
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| elastic/ml-cpp.cursor/rules/ml-cpp-buildkite-ci.mdc · 157 | Cursor rules | buildstylearchsecurity+2 | 56/100 | today | |
| elastic/ml-cpp.cursor/rules/ml-cpp-ci-analytics.mdc · 157 | Cursor rules | buildgit | 54/100 | today | |
| elastic/ml-cpp.cursor/rules/ml-cpp-coding-conventions.mdc · 157 | Cursor rules | buildteststylegit+1 | 63/100 | today | |
| elastic/ml-cppAGENTS.md · 157 | AGENTS.md | buildtestlint-formatstyle+4 | 96/100 | today | |
| elastic/ml-cppCLAUDE.md · 157 | CLAUDE.md | buildteststylegit+1 | 71/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| fledge-iot/fledge.cursor/rules/docs.mdc · 185 | Cursor rules | setupbuildteststyle+8 | 76/100 | 14 days ago | |
| Adit-Jain-srm/NightmareNet.cursor/rules/agent-core.mdc · 46 | Cursor rules | gitsecuritydo-notagent-behaviour | 76/100 | today | |
| Vrooli/Vrooli.cursor/rules/doc.mdc · 55 | Cursor rules | setuplint-formatstylearch+2 | 74/100 | 14 days ago | |
| Vrooli/Vrooli.cursor/rules/memory.mdc · 55 | Cursor rules | stylearchdo-notdocs | 67/100 | 14 days ago | |
| elastic/ml-cpp.cursor/rules/ml-cpp-coding-conventions.mdc · 157 | Cursor rules | buildteststylegit+1 | 63/100 | today | |
| wshobson/agents.cursor/rules/000-project-conventions.mdc · 39k | Cursor rules | lint-formatstylesecuritydo-not+1 | 62/100 | 14 days ago | |
| elastic/ml-cpp.cursor/rules/ml-cpp-buildkite-ci.mdc · 157 | Cursor rules | buildstylearchsecurity+2 | 56/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/elastic-ml-cpp-cursor-rules-ml-cpp-build-system)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.