target_link_libraries does not check if target exists
target_link_libraries
does not check if the linked target exists. Is this intended or a bug?
cmake --version
cmake version 3.9.1
Example CMakeLists.txt
project file:
cmake_minimum_required(VERSION 3.1)
cmake_policy(VERSION 3.1)
# create interface library
add_library(bar INTERFACE)
target_include_directories(bar INTERFACE .)
# add executable
add_executable(foo foo.cpp)
# intent to link bar, but have a typo and include non-existent target
target_link_libraries(foo PRIVATE baz)