Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 14.0.0
-
None
-
-
5895ad565 (13.0)
Description
When pressing F2 (follow symbol under cursor) on folder name in add_subdirectory() function in cmake file it can jump to target with the same name instead of jumping to CMakeLists.txt file in subfolder.
One could use same name for target and for a folder with tests for that target. Consider project structure:
./CMakeLists.txt ./main.cpp ./OtherTarget/CMakeLists.txt ./OtherTarget/OtherTarget.cpp ./Tests/CMakeLists.txt ./Tests/Tests.cpp ./Tests/OtherTarget ./Tests/OtherTarget/CMakeLists.txt ./Tests/OtherTarget/test_OtherTarget.cpp
Tests/CMakeLsits.txt content:
project(Tests) add_executable(${PROJECT_NAME} Tests.cpp) add_subdirectory(OtherTarget)
Pressing F2 on "OtherTarget" here jumps to OtherTarget/CMakeLists.txt instead of Tests/OtherTarget/CMakeLists.txt
Attachments
For Gerrit Dashboard: QTCREATORBUG-30510 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
546334,2 | [cmake] Fix follow symbol for add_subdirectory to not jump to target | 13.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |