Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ Inspect the reference build for anything unsupported. Surface them and confirm
with the user before proceeding.

**NOT yet supported — warn the user if the project has these:**
- Custom commands / generated code
- Build-time custom commands / generated code. Configure-time generated
files are handled by you, not the tool: see the reference guide.
- Per-test-binary identity alignment, and include search **order** (presence
only) — both have planned follow-ups
- Packaging / install rules
Expand Down Expand Up @@ -271,7 +272,7 @@ generated `.bazelrc` so a declared version that MVS overrides fails the build
instead of being a warning nobody reads.

The reference guide covers what is specific to translating its build system
(for CMake: the build type).
(for CMake: the build type and configure-time generated files).

### Main migration loop {#main-migration-loop}

Expand Down
14 changes: 12 additions & 2 deletions docs/REFERENCE-cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ as the reference build.

When [confirming scope](../SKILL.md#confirm-scope), inspect `CMakeLists.txt`
for these and surface them before proceeding:
- Generated code: `configure_file`, `add_custom_command`, protoc or other
codegen steps.
- Build-time generated code: `add_custom_command`, protoc or other codegen
steps. `configure_file` is handled by you, not the tool: see
[Configure-time generated files](#configure-time-generated-files).
- `find_package` of non-system libraries. There is no automatic
`find_package` → bzlmod resolution; each one must be mapped by hand.

Expand Down Expand Up @@ -63,6 +64,15 @@ also turns assertions off where the reference keeps them (`ndebug` in
`diff.json`); `build --copt=-UNDEBUG` undoes the toolchain's `-DNDEBUG`, not
one in a rule's `copts`.

### Configure-time generated files

For `configure_file` and probe headers, prefer a Starlark `configure_file` rule
over the `.in` template, so the configuration stays derived. Checking in a
probe's result is acceptable for one platform if the file says so and you
verify it, file by file, against the configure output it came from. Never
point Bazel at CMake's build directory: that will not rebuild from the
repository, which is worse than migrating less.

## CMake-specific comparison notes

- **Target names** in `target_map` and `exclude_targets` keys are CMake target
Expand Down
Loading