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 about 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 #1

Updated by hidden over 3 years ago

adtf_add_post_build_install() is to blame for this defect. The convenience added by that macro clashes with CMakes design of INSTALL.

If adtf_add_post_build_install() is supposed to be kept, it must make proper use of CMakes Components system in order to limit installation strictly to the components already built.

Actions #2

Updated by hidden over 3 years ago

  • Project changed from Public Support to 10
  • Status changed from New to In Progress
  • Topic set to ADTF::Common
Actions #5

Updated by hidden over 3 years ago

  • Status changed from In Progress to To Be Closed
  • Resolution set to Product Issue Opened
  • Product Issue Numbers set to https://www.cip.audi.de/jira/browse/ACORE-9369

Ja, das nervt immer wieder! Ich denke das sollten wir in ACORE-9369 mitmachen. Ich schreibs dort ins Ticket rein.

Actions #6

Updated by hidden over 3 years ago

  • Project changed from 10 to Public Support
  • Description updated (diff)
  • Private changed from Yes to No
  • Customer set to DIGITALWERK
  • Department set to ENTWICKLUNG
Actions #7

Updated by hidden about 2 years ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF