You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MP4V2_PROJECT_build is currently defined in project.h. This is included in mp4v2.h which is then included in many more places. Whenever the project is reconfigured (in my case any time I modify a CMake config), all objects become invalidated and have to be rebuilt again.
MP4V2_PROJECT_build is only used in libutil/Utility.cpp. This variable, since it changes more regularly than all of the other variables in project.h should be moved into a separate header and included only where needed. Currently this would mean that only libutil/Utility.cpp is recompiled when the project is reconfigured.
One option is to add project_build.h.in and include that only in libutil/Utility.cpp. This solves the issue for me locally using CMake.
An extension to this might be to also separate out the version variables, leaving only "static" variables in project.h, and then again only including project_version.h, for example, where those variables are needed.
The text was updated successfully, but these errors were encountered:
As another workaround, you can set the SOURCE_DATE_EPOCH environment variable to a static timestamp (in Unix "seconds-since-1970-01-01 00:00:00 UTC" format). CMake will generate the same MP4V2_PROJECT_build variable each run, using that timestamp value.
(This works because the value is generated using CMake's string(TIMESTAMP ...) command, which since CMake 3.8 automatically supports SOURCE_DATE_EPOCH.)
MP4V2_PROJECT_build
is currently defined inproject.h
. This is included inmp4v2.h
which is then included in many more places. Whenever the project is reconfigured (in my case any time I modify a CMake config), all objects become invalidated and have to be rebuilt again.MP4V2_PROJECT_build
is only used inlibutil/Utility.cpp
. This variable, since it changes more regularly than all of the other variables inproject.h
should be moved into a separate header and included only where needed. Currently this would mean that onlylibutil/Utility.cpp
is recompiled when the project is reconfigured.One option is to add
project_build.h.in
and include that only inlibutil/Utility.cpp
. This solves the issue for me locally using CMake.An extension to this might be to also separate out the version variables, leaving only "static" variables in
project.h
, and then again only includingproject_version.h
, for example, where those variables are needed.The text was updated successfully, but these errors were encountered: