-
Notifications
You must be signed in to change notification settings - Fork 463
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
Show a quickPick of all the CMakeLists.txt inside the project (if not in the root) #533
Comments
Building a CMakeLists.txt in a subdirectory (Windows) is a pain. First I have to go to VS Code settings, change the workspace Then I get exception "[rollbar] Unhandled exception: Unhandled Promise rejection: configure [cmake-server] Failed to activate protocol version: "CMAKE_HOME_DIRECTORY" is set but incompatible with configured source directory value. {}". To fix this, I have to remove the |
VSCode extensions have something called "activation events," which they register in their There is a special |
Doesn't this just require |
cmake.sourceDirectory Doesn't seem to work now:
|
Would love to have the ability to use CMake tools in vscode from a sub-directory of current working dir. It is particularly painful when using something like pybind with cmake where it is necessary to put the CMakeLists.txt in a sub-folder instead of the root to keep the project structure sensible (see below). /root with the above project structure, the extension cannot find /root/cpp/CMakeLists.txt and so we have to do all the building manually. |
CMake's Eclipse generator requires that CMakeLists.txt live in a sibling of the build directory, so I've got an existing project with myProject/src/CMakeLists.txt and a myProject/debug build directory. This all works, but I can't seem to get vscode + CMake Tools working with it. I tried opening the folder configuration and putting this in settings.json: {
"cmake.buildDirectory": "${workspaceRoot}/debug",
"cmake.sourceDirectory": "${workspaceRoot}/src"
} But I get Edit: Well, cleaning out myProject/debug seems to have helped. |
I submitted a PR for this. It should be included in the 1.2.0 release. |
@bobbrow I just found out that: "Maintainer Changes (7/12/19) |
This issue has been addressed in CMake Tools 1.2.0 which is available in the VS Code Marketplace or on the Releases Page Because the publisher id has changed, VS Code does not automatically upgrade you yet. The Marketplace team will enable this in the next few days. If you want to install 1.2.0 now, please make sure you uninstall any earlier versions of CMake Tools manually to avoid any conflicts. |
Can this be made to support more than two levels of subfolders? If I select Folder3 get: The reason why I want to do this is that I have: |
The change simply activates the extension if a CMakeLists.txt is found in the workspace. If your CMakeLists.txt is not directly in the Are you asking for a feature to automatically detect the root CMakeLists.txt? |
I was facing the same issue this morning. I tried to set I think the message displayed is not relevant when the CMakeLists.txt is not found. For a first approach, it could be updated to point to this setting. But the best approach in my case, would be to automatically detect the CMakeLists.txt in the workspace folder and prompts which one to use in case more than one have been found. |
@bobbrow Yes, I also would like to have CMakeTools to dectect automatically the first root CMakeLists.txt |
Hilariously enough, the plugin prompts the user to "Don't ask again"... and then proceeds asks again, for every project. |
Yeah, the "Don't Show Again" button was intended to inherit the context of the question: "CMakeLists.txt was not found in the root of the folder <foo>. How would you like to proceed?" It was only meaning "Don't show again for this folder", but I can see how that can be confusing. |
Starting work on this feature for 1.8
|
Brief Issue Summary
CMake Tools doesn't detect CMakeLists.txt automatically if it is not in the root directory on Linux (I haven't tried other OSs). The CMakeLists.txt is in a subdirectory of the root directory and cmake.sourceDirectory is set to point to that subdirectory.
If I execute the command to configure the project manually it runs as expected.
Expected:
The same behavior as if CMakeLists.txt is in the root directory: when the project is opened CMake Tools should ask me if I want to configure the project.
The text was updated successfully, but these errors were encountered: