Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 10.0.0-beta2
-
None
Description
cmake's INTERFACE libraries nowadays can include headers, which will then be used to populate IDE projects. this works like charm in qtcreator and is a great quality of life improvement.
however there is a small issue when it comes to the code model for these headers: when opening a header, there is not parse context attached
see attached project
cmake_minimum_required(VERSION 3.25) project(test VERSION 0.1.0 LANGUAGES CXX C) add_library(lib INTERFACE include/lib/a.h include/lib/b.h) target_include_directories(lib INTERFACE include) add_executable(x main.cpp) #target_link_libraries(x lib)
qtcreator creates a "project" target for the interface library `lib`, that contains `lib/a.h` and `lib/b.h` (which is expected), but according to the code model, they are not part of any project.
expected behaviour: a.h/b.h are parsed in the (interface) context of `lib`
this might be a duplicate of QTCREATORBUG-27764