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
commit cbf8c64b58d50038aa051cdcd595923f57191295
Author: Gleb Mazovetskiy <[email protected]>
Date: Sat Dec 4 11:23:42 2021 +0000
cmake: Correctly handle generated files
Generated files depend on other generated files, and this previously
resulted in the same custom command output being a dependency of
multiple other custom commands without a shared custom targets.
Adds a top-level target for each generated file and ensures that
commands that depend on generated files also depend on the corresponding
custom targets.
Per CMake documentation:
> Do not list the output in more than one independent target
> that may build in parallel or the two instances of the rule
> may conflict (instead use add_custom_target to drive the command
> and make the other targets depend on that one).
Signed-off-by: Cosmin Truta <[email protected]>
../configure --with-libpng-prefix=conf; make -j; make -j check works and symbols are prefixed with conf
cmake .. -DPNG_PREFIX=cmake; make; make test works and the symbols are prefixed with cmake
cmake .. -DPNG_PREFIX=cmake; make -j fails, as reported
So pngprefix.h is being built twice in the same place (apparently). A work-round is to build without -j. This works:
cmake .. -DPNG_PREFIX=cmake; make -j; make; make -j test
The double build of pngprefix.h can be seen in the make output; Generating scripts/prefix.out appears twice with make -j
That said I can't even find where the dependencies on scripts/prefix.out are; needs a fix from @ctruta. Building -DPNG_SHARED=off doesn't help either (as reported.)
On Linux ubuntu 22.04, Steps to reproduce
The text was updated successfully, but these errors were encountered: