Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
Qt Creator 4.9.2
-
None
Description
Hello,
The cmake project that I'm working on has a symlink to a directory with header files. In the end both paths get their way into include directories list which results in include completion showing doubled results coming from both the directory and the symlink to it. See the attachments.
Expected behaviour is to show only one path.
spdlog used as an example:
/home/dantez/projects/spdlog/include mylinkinclude -> /home/dantez/projects/spdlog/include
CMakeLists.txt:
target_include_directories(spdlog PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/mylinkinclude>")
The quick fix I wrote solved the issue though filtering is applied on every completion - which is failproof to changes to the link itself. I assume this is why cmake can't filter it out.
https://gist.github.com/DanielChabrowski/24b6481cade657f4af7f0c615d1a9be2
If this is enough I can issue a MR. Cheers.