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 expects CMakeLists.txt in project root folder #510

Closed
andyinno opened this issue Aug 6, 2018 · 6 comments
Closed

cmake-tools expects CMakeLists.txt in project root folder #510

andyinno opened this issue Aug 6, 2018 · 6 comments
Labels
duplicate a duplicate of an already present issue enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure
Milestone

Comments

@andyinno
Copy link

andyinno commented Aug 6, 2018

Brief Issue Summary

My scenario:
Using GPM (Git Project Manager) for opening a project root.
The Project root contains documentation, sources that compile with different tools (different target architecture) using different toolchain and software pieces.

When opening up the project cmake-tools complains that it cannot find a CMakeLists.txt file in the directory. I have to edit the preferences file and add the line:

"cmake.sourceDirectory": "${workspaceRoot}/Src"

In order to compile the software.
In my opinion it would be nice if cmale-tools is not able to find a CMakeLists.txt file in the root directory to recursively try to find a CMakeLists.txt in any subfolder of the project. Then asks to the user which CMakeLists.txt to use.

As a plus feature if the extension can looks inside the CMakeLists.txt in order to find a Project directive it would allow to get only the main CMakeLists.txt that drives the compilation of all the sources.

The main case is:

Using CMake for cross compile the software that runs on a custom board with different microprocessors.
The software of the different microprocessors must be in sync so it is common to use a single git repository for the sources of the different processors.

The CMakeLists could be different as could be different the toolchain file used for cross compiling.

Allowing an easy to do configuration and switch between the toolchains and the main projects would be a great thing.

In any case I think that prompting for which CMakeLists.txt to use, if present in a sub folder, allow to better interact with other plugins.

would love to ear your comments
thank you
Andrea

@vector-of-bool
Copy link
Contributor

Sorry for the late response. I've been busy for a few weeks.

This is entirely implementable, and can be useful to those with more complex project layouts. I'll take a look.

@vector-of-bool vector-of-bool added the enhancement an enhancement to the product that is either not present or an improvement to an existing feature label Aug 14, 2018
@vector-of-bool vector-of-bool added this to the Backlog milestone Aug 14, 2018
@cybik
Copy link

cybik commented Nov 30, 2018

Voting this up. My CMakeLists.txt is in a subdir 3 levels down from the root of the whole project (sources, resources and all). Using vscode requires a couple of hoops to jump through just to get it to compile my project.

@vector-of-bool vector-of-bool modified the milestones: Backlog, On Deck Dec 10, 2018
@Zingam
Copy link
Contributor

Zingam commented Feb 16, 2019

#533

@Zingam
Copy link
Contributor

Zingam commented Feb 16, 2019

If "cmake.sourceDirectory": "${workspaceRoot}/Src" the extension misbehaves. It won't configure the project automatically sometimes.

@aleksas
Copy link

aleksas commented Jul 22, 2021

+1

@bobbrow
Copy link
Member

bobbrow commented Jul 26, 2021

This feels somewhat like a duplicate of #533 which will be released with version 1.8 relatively soon. If you want a sneak peek, you can download and install any of our daily builds from the Build VSIX workflow.

If there is something else that you would like to see as part of the startup experience, please let us know.

@bobbrow bobbrow closed this as completed Jul 26, 2021
@bobbrow bobbrow added the duplicate a duplicate of an already present issue label Jul 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate a duplicate of an already present issue enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure
Projects
None yet
Development

No branches or pull requests

6 participants