Slow code completion when working with cmake & large library



  • Hi, everyone!
    I'm doing some work with PCL (Point Cloud Library) using Qt Creator.
    I choose to use CMakeLists.txt as the project file. But I found code completion in Qt Creator doesn't work well. It's terribly slow, about 15 - 20 seconds after I hit '.' or '->' did the code completion window pop up. This is very inconvenient as I rely on code completion very heavily. Can anyone point out where the problem is and what to do for me? Many thanks!

    here is my CMakeLists.txt file:

        project(cmake-pcl)
        cmake_minimum_required(VERSION 2.8)
        aux_source_directory(. SRC_LIST)
        find_package(PCL 1.7 REQUIRED)
        INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS})
        LINK_DIRECTORIES(${PCL_LIBRARY_DIRS})
        add_definitions(${PCL_DEFINITIONS})
        add_executable(${PROJECT_NAME} ${SRC_LIST})
        target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES})


  • [EDIT]
    I've tried to use qmake as the project manager. And I put this line in ".pro" file:

    INCLUDEPATH += /usr/local/include/pcl-1.8
    

    This time Qt Creator acts a little bit faster, but far from satisfactory - about 4 seconds.
    Don't know what's going on there. Since the Qt library itself is considerably large. And Qt Creator handles it very well.
    If I don't add that line of "INCLUDEPATH +=..." . Instead, by specifying the complete path relative to "/usr/local/include" (that is, adding such directives: "#include <pcl-1.8/pcl/io/pcd_id.h>" into source codes), the code completion functions real fast.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I'd recommend bringing that matter to the Qt Creator team through the qt-creator mailing list(don't' forget to subscribed first) or #qt-creator IRC channel.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.