Support Request #12297
closedadtf_install_plugin CMake macro breaks by race-condition with MSVC generator
Description
Supportanfrage
The adtf_install_plugin CMake macro is not safe to use when multiple CMake targets have been declared in the same source directory. This defect is inherited from the basic CMake INSTALL method.
For all targets declared in the same source directory, only a single, common `cmake_install.cmake` file is created which doesn't distinguish between the targets it is being invoked from. At the same time, anything listed in that file which hasn't been generated yet creates an error for the invoking target.
E.g. when building plugins "foo" and "bar" from the same directory, clean build, then even though they have no dependencies on each other, the first of them to finish compilation will "fail", while the last to finish will "succeed".
A second build attempt without a clean will then succeed, as the install script is then copying artifacts from the previous build for unfinished targets. (And by that potentially introducing other spurious build failures.)
In a variant of this race conditions, both targets will succeed on first attempt, but only partially written artifacts have been installed.
Lösung
Will be solved within ACORE-9369