Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-30510

Follow symbol for add_subdirectory in cmake should not jump to target

    XMLWordPrintable

Details

    • All
    • 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

        Activity

          People

            cadam Cristian Adam
            volodymyr_zibarov Volodymr Zibarov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes