blt_patch_target needs to handle import targets
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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