Project

General

Profile

Actions

Support Request #12297

closed

adtf_install_plugin CMake macro breaks by race-condition with MSVC generator

Added by hidden over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Customer:
DIGITALWERK
Department:
ENTWICKLUNG
Requester's Priority:
Low
Support Level:
2nd Level
Resolution:
Product Issue Opened
Affected Products:
Platform:
Windows 10 64bit
Topic:
ADTF::Common
FAQ Links:

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

Actions

Also available in: Atom PDF