Giter VIP home page Giter VIP logo

Comments (4)

MrPointer avatar MrPointer commented on May 25, 2024

@Alexivia Hello and welcome to the project, I appreciate your words very much!
Regarding your concern - I have some trouble realizing exactly what you're expecting from the framework.

Libraries, as the framework treats them, are simply folders that conform to a certain standard implied by Arduino. Not all of them have to conform, especially when they're custom libraries as in your case, but all of them have to be found - What it means is that you should always specify which libraries are to be included in your project using CMake code.

Looking back at your description - It looks like you're looking for a way to request the framework to treat all of the sub-directories of a given directory as libraries that are going to be used.
And, since you have a lot of libraries, you probably won't use all of them every single time - What makes this request somewhat uncomfortable, from an automation perspective.
Eventually, such a feature will cause a code-size blast, as all libraries will be built and statically linked to targets, maybe even a single target, and that of course increases code size (and memory). No embedded developer ever wants that, is it?

Before we continue discussing alternatives, please let me know if this indeed was your intention.

from arduino-cmake-ng.

Alexivia avatar Alexivia commented on May 25, 2024

@MrPointer Thank you for your reply!

Though my libraries are custom, I comply to the Arduino standard by having a directory with the library name and the source files inside a src sub-directory. The framework makes this recursive search with the standard Arduino libraries, by compiling and linking only the requested libraries on the code. My suggestion was to do this selective recursive search inside a user-provided directory with Arduino-compliant libraries that would only be compiled and linked if found mentioned in #include <.h> statements on the provided source code.

Once again, I can make my projects correctly comply using the framework as-is, however it is a cumbersome job to make a specific set of cmake include and link statements for each different project, moreover to link them to the correct target.

Thank you again for your feedback!
Regards,
Alexandre

from arduino-cmake-ng.

MrPointer avatar MrPointer commented on May 25, 2024

Well, your desired feature is simply not going to happen anytime soon, sorry.
The purpose of the framework is to provide Arduino developers an easy way to maintain their projects using CMake, as it's a CMake framework, and by no means it should behave similar to what the Arduino IDE does. In other words, this is just something that can't be done well with CMake as this is not the right tool for this job, and is completely out of the scope of the framework, at least for now.
I understand the inconvenience, however, this kind of support is more suitable for a plugin.

For example, take VS Code - It could have an extension/plugin for Arduino-CMake that automatically generates matching CMake scripts that make use of the framework. Moreover, it could read your source files, search for includes, and generate explicit CMake code to use matching libraries based on its' findings.
This sort of task is typical for a plugin, but not to a CMake framework, unfortunately.
If you like this idea, you can always put some effort and develop it! 😃

from arduino-cmake-ng.

Alexivia avatar Alexivia commented on May 25, 2024

I'm not an expert in CMake nor Make by any means, I just know enough to use these kind of frameworks and basic scripting... Maybe that's why I though my request was easier to implement than what you are saying... But it makes sense that an IDE plugin is best fit for this task!

Thank you for your support!

from arduino-cmake-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.