Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Tools doesn't support source files outside the directory of the CMakeLists.txt #1140

Closed
julee opened this issue Mar 24, 2020 · 6 comments
Labels
bug a bug in the product Feature: cpptools integration fixed (release pending) fixed in pre-release and is pending official release
Milestone

Comments

@julee
Copy link

julee commented Mar 24, 2020

Brief Issue Summary

e.g:
A workspace has a CMakeLists.txt, and it add a external directory as submodule:

add_subdirectory(externalSubModule path_to_external_submodule_outside_root_directory)

While we set:
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools"

Source files in workspace directory have correct intellisense, but if we navigated to source files of the external submodule by add_subdirectory, intellisense won't work.

Expected:

The same behavior as sources files in workspace directory.

@bobbrow
Copy link
Member

bobbrow commented Mar 28, 2020

Do the files show up incorrectly in the project outline as well? I just tried this and it looks like it's concatenating paths.

image

@julee
Copy link
Author

julee commented Mar 28, 2020

Do the files show up incorrectly in the project outline as well? I just tried this and it looks like it's concatenating paths.

image

Yes, external source files paths are wrong. Though we can navigate to source file with "goto definition" .

@bobbrow
Copy link
Member

bobbrow commented Mar 30, 2020

Thanks for confirming. I have a PR out with a fix.

@andreeis andreeis added this to the 1.4.0 milestone Mar 31, 2020
@bobbrow bobbrow added the fixed (release pending) fixed in pre-release and is pending official release label Apr 8, 2020
@andreeis
Copy link
Contributor

CMake Tools 1.4.0 Beta is available on GitHub.
https://github.com/microsoft/vscode-cmake-tools/releases/tag/1.4.0-beta

Please try it out and let us know if you encounter any issues.

@julee
Copy link
Author

julee commented May 19, 2020

CMake Tools 1.4.0 Beta works now. Thanks!

@andreeis
Copy link
Contributor

This fix is available in CMake Tools #1.4.0 which has been released.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: cpptools integration fixed (release pending) fixed in pre-release and is pending official release
Projects
None yet
Development

No branches or pull requests

3 participants