CMake/Tests/RunCMake/Autogen_1
Alexandru Croitor 2b314e9009 Autogen: Fix missing autogen dependencies if a target is linked twice
Autogen contains code to forward dependencies from an origin target
to its associated <origin>_autogen target. This code also contains a
check to skip forwarding a dependency if it does not appear in the
dependency graph for all configured build types.
This is done by counting the number of times a dependency appears in
the graph for each configured build type.

Unfortunately the code did not account for the case when a dependency
appears more than once in the link graph for a single build type. This
means that for a single-config build, if the same dependency is linked
twice, the dependency will be skipped altogether.

This can lead to build errors in a project where a hypothetical App
target depends on a Lib target, and thus expects App_autogen to depend
on Lib_autogen and any of its dependencies, but the latter is skipped.

Fix this by incrementing the count of a target in the dependency graph
only once per build type.

Fixes: #26700
2025-02-13 14:33:41 -05:00
..
AutogenDuplicateDependency.cmake Autogen: Fix missing autogen dependencies if a target is linked twice 2025-02-13 14:33:41 -05:00
AutogenSkipLinting-build-stderr.txt
AutogenSkipLinting.cmake
AutogenUseSystemIncludeCommon.cmake
AutogenUseSystemIncludeOff.cmake
AutogenUseSystemIncludeOn.cmake
CMakeLists.txt
CMP0111-imported-target-full.cmake
CMP0111-imported-target-implib-only.cmake
CMP0111-imported-target-libname.cmake
CMP0111-imported-target-prelude.cmake
CMP0151-common.cmake
CMP0151-new.cmake
CMP0151-old.cmake
empty.cpp
Inspect.cmake
MocGeneratedFile.cmake
MocPredefs-build-stderr.txt
MocPredefs-check.cxx
MocPredefs-prefix.cmake
MocPredefs.cmake
MocPredefs.cxx
NoQt-stderr.txt
NoQt.cmake
QtInFunction.cmake
QtInFunctionNested-stderr.txt
QtInFunctionNested.cmake
QtInFunctionProperty.cmake
RunCMakeTest.cmake Autogen: Fix missing autogen dependencies if a target is linked twice 2025-02-13 14:33:41 -05:00
SkipLinting.cxx
SkipLinting.h