Skip to content

Conversation

@rainyl
Copy link
Owner

@rainyl rainyl commented Jan 24, 2026

fixes: #25

Add a new optional parameter skipGenerateIfCached to the CMakeBuilder.run method. When set to true, the builder will skip the CMake generation step if a valid CMakeCache.txt exists and the last generation was successful, improving build performance for repeated builds. The last generation status is persisted to a file in the output directory to track success.

Add a corresponding unit test to verify the caching behavior.

Add a new optional parameter `skipGenerateIfCached` to the `CMakeBuilder.run` method. When set to `true`, the builder will skip the CMake generation step if a valid CMakeCache.txt exists and the last generation was successful, improving build performance for repeated builds. The last generation status is persisted to a file in the output directory to track success.

Add a corresponding unit test to verify the caching behavior.
The previous logic incorrectly skipped generation when skipGenerateIfCached was false. The condition was inverted, causing generation to be skipped when it should run. Now properly track skip state and only skip when both conditions are met.
The condition was inverted, causing generation to be skipped when it should run and vice versa. This prevented CMake projects from being generated when needed.
@rainyl rainyl merged commit 6ea8e6c into main Jan 24, 2026
19 checks passed
@rainyl rainyl deleted the skip-generate-if-cached branch January 24, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: Add support for only running build when CMakeCache.txt already exists

1 participant