Comments (4)
@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.
@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.
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.
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)
- Project is dead HOT 1
- upload_arduino_target does not work (avrdude problem?) HOT 4
- Problem when with determining link language. HOT 3
- Include library header from another library HOT 9
- Undefined reference error when linking 3rd party libraries. HOT 4
- Refactor upload API
- Undefined reference to countPulseASM when using pulseIn function HOT 8
- Newbie: need some hand holding. HOT 2
- RegisterHardwarePlatform doesn't work HOT 3
- Install for library depending on platform HOT 6
- FastLED library linker errors HOT 1
- vidor 4000 HOT 1
- SDK not found on Debian 9 with official Arduino binary HOT 2
- Provide means to override `avrdude`
- find_arduino_library simply doesn't work HOT 6
- ARDUINO_SDK_PATH variable is forgotten during compiler check (v0.6.1) HOT 2
- Support for Third-Party Boards - Game plan HOT 4
- Reduce search-paths for version.txt file
- Board 'nano33ble' not working, unrecorgnized command -mcpu=cortex-m4 HOT 1
- SD card library is not being found. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-cmake-ng.