go2sh / cmake-integration-vscode

CMake Server Interface for VSCode.
https://go2sh.github.io/cmake-integration-vscode/
Other
19 stars 11 forks source link

Many include folders not found. #39

Closed SoftwareApe closed 5 years ago

SoftwareApe commented 5 years ago

Thank you for creating this extension, it's quite helpful in configuring complex CMake workspaces.

ROS/catkin use CMake under the hood. Maybe it's something about the structure of the CMakeLists that makes it hard to find some includes.

3 examples where the includes weren't added to the include directories:

  1. Maybe it's the comment? Or maybe the macro expansion (quite common with catkin):
include_directories(
    include
    src
    # ${HEADERS}
    ${catkin_INCLUDE_DIRS}
)
  1. Here I can only blame the macro expansion, otherwise it seems straightforward

    include_directories(
    inc
    ${catkin_INCLUDE_DIRS}
    )
  2. I guess target_include_directories may be a bit more of an edge case than the previous two:

    target_include_directories(stubbing
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/inc
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/
    )

None of the include directories here are added to the path. I can only guess that this is a problem parsing the CMakeLists.txt.

go2sh commented 5 years ago

Can you eleborate more on the problem you encounter with the extension? Is it the cpptools support? Or do you have problems building? The extension doesn't parse the cmake files on its own. It relays on either the cmake-server or the cmake-file api to provide all necessary information to it.

SoftwareApe commented 5 years ago

Thank you for your quick reply 👍 . I thought the extension scans directly, I did take a quick look at the code but not deep enough to find how the scan for dependencies works.

Do you have any idea why it might find some dependencies but not others? It finds about half of my projects dependencies, but not all of them and adds them to cpptools.

go2sh commented 5 years ago

Is this still a problem?

SoftwareApe commented 5 years ago

I think this is a problem with cmake

Christoph Seitz notifications@github.com schrieb am Mi., 11. Sep. 2019, 21:31:

Is this still a problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/go2sh/cmake-integration-vscode/issues/39?email_source=notifications&email_token=AEGAV2RWZCJVXGMUSGDAQLLQJFBQXA5CNFSM4IJ4VF32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6PUGQQ#issuecomment-530531138, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGAV2V2VAZCR37QYTTS4J3QJFBQXANCNFSM4IJ4VF3Q .

go2sh commented 5 years ago

Any news? Feel free to open it again.

SoftwareApe commented 4 years ago

Sorry, I was on vacation. I didn't check anymore.