Skip to content
Snippets Groups Projects

Allow use of local targets instead of imported ones

Merged Marco Clemencic requested to merge clemenci/Gaudi:add-prefer-local-targets into master

To support the LHCb satellite projects use case, I added the option GAUDI_PREFER_LOCAL_TARGETS. When it's set to true, the arguments to the LINK option of gaudi_add_* commands will drop the namespace part of the target if a local target with the same name exist.

So if an already processed subdirectory defines the library MyStuff, the following code

set(GAUDI_PREFER_LOCAL_TARGETS TRUE)
gaudi_add_library(MyOtherStuff SOURCES src/abc.cpp
    LINK PUBLIC SomeProject::MyStuff)

will be equivalent to

set(GAUDI_PREFER_LOCAL_TARGETS TRUE)
gaudi_add_library(MyOtherStuff SOURCES src/abc.cpp
    LINK PUBLIC MyStuff)

The option GAUDI_PREFER_LOCAL_TARGETS is OFF by default.

Edited by Marco Clemencic

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading