blt
blt copied to clipboard
`FOO-NOTFOUND` in `blt_add_executable` `DEPENDS_ON` list causes all dependencies to be lost
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)