llnl / llnl/blt

blt_patch_target needs to handle import targets

Open
#775 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
296
Forks
66
Avg merge
1h 3m
Merged PRs (30d)
1

Description

@liu15 reported the following error:
```
CMake Error at .../blt/cmake/BLTInstallableMacros.cmake:656 (target_link_libraries):
IMPORTED library can only be used with the INTERFACE keyword of
target_link_libraries
Call Stack (most recent call first):
cmake/thirdparty/SetupAxomThirdParty.cmake:197 (blt_patch_target)
cmake/CMakeBasics.cmake:21 (include)
CMakeLists.txt:133 (include)
```

The blt_patch_target usage was here:
https://github.com/llnl/axom/blob/47c66c3dd7e04ad57ce3e5aecaef8d036004307b/src/cmake/thirdparty/SetupAxomThirdParty.cmake#L195-L198

@white238 was able to work around this in smith with
https://github.com/llnl/smith/blob/e3637a22ad62229571e606479847318a2d2d992c/cmake/thirdparty/FindMFEM.cmake#L164

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in BLTInstallableMacros.cmake around line 656, then inspect the blt_patch_target call in SetupAxomThirdParty.cmake around line 197 and the linked Smith workaround. Reproduce the imported-target failure and verify that blt_patch_target handles import targets without the target_link_libraries error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.