Currently, when USE_EXPLICIT_INSTANTIATION=ON, re-running CMake will trigger recompilation of OpenVDB instantiation files. The culprit is the following line:
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.
Currently, when
USE_EXPLICIT_INSTANTIATION=ON
, re-running CMake will trigger recompilation of OpenVDB instantiation files. The culprit is the following line:https://github.com/AcademySoftwareFoundation/openvdb/blob/3f8b6f30cf7c7d0d7f8fa7714965fb15d5db555b/openvdb/openvdb/CMakeLists.txt#L601
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.