Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't update timestamp when regenerating instantation files. #1657

Merged

Conversation

jdumas
Copy link
Contributor

@jdumas jdumas commented Aug 7, 2023

Currently, when USE_EXPLICIT_INSTANTIATION=ON, re-running CMake will trigger recompilation of OpenVDB instantiation files. The culprit is the following line:

file(WRITE ${INSTANTIATE_SOURCE}

As the documentation for file(WRITE) mentions, one should use configure_file() to copy generated files used as build sources, only if the content changes. Given that USE_EXPLICIT_INSTANTIATION was created to save time when recompiling dependent files, this is quite an unfortunate mistake. This PR fixes that.

@jdumas jdumas requested a review from kmuseth as a code owner August 7, 2023 19:32
@jdumas jdumas force-pushed the jdumas/cmake-timestamp branch 2 times, most recently from 4adb228 to 1b2084e Compare August 7, 2023 19:37
@Idclip Idclip merged commit 99bbd41 into AcademySoftwareFoundation:master Oct 24, 2023
40 of 41 checks passed
@jdumas jdumas deleted the jdumas/cmake-timestamp branch October 24, 2023 21:24
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.

3 participants