<div dir="ltr">I have a shared library that always rebuilds to pick up some build-specific information (including a build time stamp).<div><br></div><div>I would like to make all targets that depend on this library not to relink against it every time that library rebuilds.</div><div><br></div><div>I am aware of the existence of <a href="https://cmake.org/cmake/help/latest/prop_tgt/LINK_DEPENDS_NO_SHARED.html" target="_blank">LINK_DEPENDS_NO_SHARED</a> but it appears that using this property will disable the dependency on ALL shared library for that target. I only want to disable the dependency on the "special" library that gets rebuilt every single time. Furthermore, as far as I can tell, even though LINK_DEPENDS_NO_SHARED prevents relinking of the immediate target that depends on the always-rebuilding-library, targets one level above in the dependency chain are still relinking all of the time.</div><div><br></div><div>To be clear, here is the dependency chain:</div><div><br></div><div>AlwaysRebuildingLibrary (ARL) -> PublicLibraryThatPublishesInfoFromARL -> Libraries/Binaries</div><div><br></div><div>Is there a way to do this without resorting to crazy hacks? </div><div><br></div><div>Thanks!</div><div>Kiril</div></div>