`FOO-NOTFOUND` in `blt_add_executable` `DEPENDS_ON` list causes all dependencies to be lost
Open
Nobody has claimed this yet.
bug
User Request
- Dominant language
- C++
- Stars
- 296
- Forks
- 66
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 1
Description
Having a variable in the DEPENDS_ON list of blt_add_executable causes all dependencies to not be set in the LINK_LIBRARIES target property.
Reproducer:
cmake_minimum_required(VERSION 3.3)
project(test)
set(BLT_SOURCE_DIR "/usr/workspace/white238/blt/repo")
include(${BLT_SOURCE_DIR}/SetupBLT.cmake)
blt_import_library(NAME foo
INCLUDES /usr/lib64)
blt_add_executable(NAME mainDoesntWork
SOURCES main.cpp
DEPENDS_ON foo BAR-NOTFOUND)
blt_add_executable(NAME mainWorks
SOURCES main.cpp
DEPENDS_ON foo)
# `mainDoesntWork` will have `LINK_LIBRARIES` defined
blt_print_target_properties(TARGET mainDoesntWork)
# `mainWorks` will have `LINK_LIBRARIES` set to `foo`
blt_print_target_properties(TARGET mainWorks)
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 at the blt_add_executable entry point and inspect how its DEPENDS_ON arguments are assigned to the target's LINK_LIBRARIES property. Run the provided reproducer and confirm that foo remains in LINK_LIBRARIES when BAR-NOTFOUND is also present; done means the valid dependency is retained.
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
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100