Imported target includes non-existent path error is not always emitted
add_library(imported INTERFACE IMPORTED GLOBAL)
target_include_directories(imported INTERFACE non-existent)
add_library(interface INTERFACE)
target_link_libraries(interface INTERFACE imported)
add_executable(executable)
file(WRITE main.c)
target_sources(executable PRIVATE main.c)
target_link_libraries(executable PRIVATE interface imported)
Expected behavior: the error is always emitted independent of the order of libraries on the last line
Actual behavior: executing it as is provides no error, if the last line is replaced with target_link_libraries(executable PRIVATE imported interface)
, the error gets emitted
Edited by ilya-fedin