build: Skip configure when no variable has changed #82195
+51
−5
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.
build.ps1
always re-runs the configuration step before building since some of the CMake variables might have changed between 2 runs. This takes time in incremental builds for something that is not required most of the time.These changes read
CMakeCache.txt
and compare the values in the file with the ones that would be used in the configure invocation and skips it if they are identical. This greatly speeds up incremental builds.Local testing of a no-op incremental build has shown an improvement of almost 3 minutes in build time on Windows x64 building all 3 SDKs with no packaging, going from 6min10s before these changes to 3min30s with these changes.