cmake -B only for v3.13 and later#262
Merged
Merged
Conversation
justsmth
referenced
this pull request
Dec 12, 2025
This should fix the `Error: could not load cache` BUG. If there are already generated build files in the project directory, then if you execute the command `cmake path/project` in `$OUT_DIR/build`, cmake will not generate new build files in the `$OUT_DIR/build` directory. So `-B .` is needed. https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-B Example: ```sh cd /path/to/project cmake . # output `Build files have been written to: /path/to/project` cd /path/to/build && cmake /path/to/project # we expect the build files will be generated at current dir (/path/to/build) # but unfortunately get `Build files have been written to: /path/to/project` cd /path/to/build && cmake /path/to/project -B . # output `Build files have been written to: /path/to/build`, that is right! ``` Infomation: ``` cmake --version cmake version 3.27.7 CMake suite maintained and supported by Kitware (kitware.com/cmake). ```
ChrisDenton
approved these changes
Dec 13, 2025
ChrisDenton
left a comment
Member
There was a problem hiding this comment.
Make sense to me. The -B option was only introduced to this crate fairly recently so we're no worse off than before for older versions.
Contributor
Author
We have a few consumers still using older versions of CMake. Any chance another patch release might be posted for this soon? |
ChrisDenton
pushed a commit
that referenced
this pull request
Dec 13, 2025
## 🤖 New release * `cmake`: 0.1.55 -> 0.1.56 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.1.56](v0.1.55...v0.1.56) - 2025-12-13 ### Other - Fallback to bundled CMake if present ([#264](#264)) - Use `cmake -B` only for v3.13 and later ([#262](#262)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Member
|
A new release has been published. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues:
Addresses: #261
Description
The
-BCLI option for cmake was introduced in v3.13, but is not available in v3.12 or earlier.Testing
I built cmake v3.5 locally, and verified that this change fixes the build failure we were experiencing.