Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit ede3902

Browse files
committed
Merge branch 'bug/path-lib-fix' of https://github.com/glowmouse/Arduino-CMake-NG into bug/path-lib-fix
2 parents e174d36 + fc33e08 commit ede3902

39 files changed

+4061
-96
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ crashlytics.properties
116116
crashlytics-build.properties
117117
fabric.properties
118118

119+
### VisualStudioCode ###
120+
.vscode/*
121+
.vscode/settings.json
122+
!.vscode/tasks.json
123+
!.vscode/launch.json
124+
!.vscode/extensions.json
125+
126+
### VisualStudioCode Patch ###
127+
# Ignore all local history of files
128+
.history
129+
119130
### User-Defined
120131
[Aa]ssets/*
121132
/examples/blink-example/Blink.cpp

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.markdownlint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"default": true,
3+
"line_length": false,
4+
"no-duplicate-heading": false
5+
}

.vscode/cmake-kits.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"name": "Arduino-CMake-Toolchain",
4+
"toolchainFile": "${workspaceRoot}/cmake/Arduino-Toolchain.cmake"
5+
}
6+
]

CHANGELOG.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ It mostly addressed *3rd Party Libraries*.
4444

4545
Besides, the following sub-directories are searched under every path mentioned above:
4646

47-
- **libraries**
48-
- **dependencies**
47+
* **libraries**
48+
* **dependencies**
4949

5050
* 3rd Party Arduino Libraries do not longer have to include the **library.properties** file in their root directory - Their root directory is searched instead.
5151
Nevertheless including the file is still ***recommended***, because when the file isn't present, the framework can't infer potentially required metadata from it.
@@ -96,9 +96,9 @@ This version refactored the Sketch API entirely to enhance support for missing f
9696

9797
### New Features
9898

99-
- Headers included in a sketch file are now resolved to provide better insight
100-
- Arduino/Platform libraries that are resolved from a sketch's headers are linked to the target
101-
- Option/Policy to "forcefully" convert a sketch to a source file when adding it to a target, even if the source file already exists (Usually means that sketch has already been converted).
99+
* Headers included in a sketch file are now resolved to provide better insight
100+
* Arduino/Platform libraries that are resolved from a sketch's headers are linked to the target
101+
* Option/Policy to "forcefully" convert a sketch to a source file when adding it to a target, even if the source file already exists (Usually means that sketch has already been converted).
102102
By default it's set to **OFF**.
103103

104104
### Changes
@@ -195,4 +195,3 @@ Although basic, there's a lot that had to be done in order to reach a somewhat "
195195
* Parsing the `platform.txt` file is an entirely new concept that hasn't been used until now in all forks of the old Arduino-CMake. In fact, this is what allows the framework to be truly platform-agnostic, as it defines the platform's core behavior
196196

197197
Many more subtle and internal features have been implemented, but they won't be listed here.
198-

CONTRIBUTING.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22

33
## Short Brief ##
44

5-
### What is this file? ###
5+
### What is this file ###
6+
67
It is a set of guidance rules for developers who'd like to contribute to this repo.
78
Versions go forward, new features are added, the API can change, but sometimes - Documentation doesn't keep the pace, unfortunately.
89
To address those issues and allow developers to contribute good, quality code - This file must exist and always be up to date.
910

1011
### Dear Contributors ###
12+
1113
First of all, thank you for taking your time even considering contributing to this repo.
1214
It is extremely important to us that you, ordinary users or continuous collaborators, contribute to this project in a combined effort to make it greater, stable than ever before.
1315

1416
## Submitting Issues ##
17+
1518
New features and bug reports keep the project moving forward and getting better.
1619
This is partly your duty, the user, to request those features and report the bugs.
1720

1821
### Before you submit an issue ###
22+
1923
* Please make sure your'e using the latest version of **Arduino CMake**.
2024
Generally it's the [latest release](https://github.com/arduino-cmake/Arduino-CMake-NG/releases), unless said otherwise by any of the maintainers.
2125
* Go over the existing issue list (including closed ones) to make sure your issue hasn't already been reported or fixed.
2226

23-
### Submitting a good issue ###
27+
### Submitting a good issue ###
28+
2429
Issues can be submitted with a very short description, but that would make the life of the developers addressing it very hard, leading to unresolved issues due to lack of information.
2530

2631
Here is a set of rules you should apply to **every** issue you submit:
@@ -30,11 +35,11 @@ Here is a set of rules you should apply to **every** issue you submit:
3035
* If the issue regards a special behavior, maybe related to a specific board - Please tell us all you know about it and put some links to external sources if those exist
3136
* Use Markdown formatting as appropriate to make the issue and code more readable
3237

33-
#### Issue Signature
38+
#### Issue Signature ####
3439

3540
At last, you should sign your issue with a special signature, following the next format:
3641

37-
```
42+
```None
3843
OS: [Windows|OSx/MacOS|Linux]
3944
Distribution (Linux Only): [Fedora|Debian|Ubuntu|CentOS] etc.
4045
OS Version: [Version]
@@ -48,9 +53,10 @@ Platform SDK Version: [Version]
4853
* SDK versions usually have the form of [major].[minor].[patch], such as 1.8.5.
4954
* OS Distribution should be mentioned only for Linux-based OSs
5055

51-
## Code Contribution
56+
## Code Contribution ##
57+
58+
### Code Style ###
5259

53-
### Code Style
5460
Like most projects, **Arduino-CMake** uses its own coding style which ensures that everybody can easily read and change files without the hassle of reading 3 different indentation styles paired 4 ways of brace spacing.
5561

5662
While we believe that the coding style you are using benefits you, please try and stick to the project's accepted style as close as possible.
@@ -59,24 +65,26 @@ It will take care of the some of the greatest hassles like indentation, new line
5965
As for spacing, naming conventions, etc. - Please look at existing code to get an idea of the style.
6066
If you use an Jetbrains `IDEA` based IDE (for example `CLion`), chances are that the auto formatting functionality will take care of things due to the project's `codeStyleSettings.xml` residing in the repository.
6167

62-
### Versioning
63-
This project follows the [semantic versioning](http://semver.org/spec/v2.0.0.html).
68+
### Versioning ###
69+
70+
This project follows the [semantic versioning](http://semver.org/spec/v2.0.0.html).
6471
It also allows easy integration with our [Workflow Model](#Project Workflow), which is described next.
6572

66-
### Project Workflow
73+
### Project Workflow ###
6774

6875
Up to version *0.6*, included, this project followed Git's [Classic Workflow Model](http://nvie.com/posts/a-successful-git-branching-model), allowing developers to work on multiple features simultaneously without clashing. This model is a bit different than suggested by **GitHub**, intended mostly for offline Git repositories.
6976
For this reason the project has adapted the model to GitHub's model from version *0.6.x* and above.
7077

7178
The elements of the adapted model are thoroughly described in the following sections.
7279

73-
#### Bug Fixes
80+
#### Bug Fixes ####
81+
7482
Bug fixes can be found in the *stable release* or in a *developed feature*.
7583
The way we treat them is different, described in the next sections.
7684

7785
**Note:** Before claiming to find a bug, make sure you are on the latest commit of that branch.
7886

79-
##### Release Bugs/Critical Bugs
87+
##### Release Bugs/Critical Bugs #####
8088

8189
Those are the ones with the highest priority to fix. If you encounter such a bug you should immediately submit a new issue. Before you submit, please see [Submitting Issues](#Submitting-Issues).
8290
If you'd like to fix the bug yourself, please **state that** in the issue.
@@ -89,73 +97,76 @@ A better name would be `hotfix/platform-libraries-reloading`.
8997
According to our [Workflow model](#Project-Workflow), once the hotfix is finished one should:
9098

9199
1. Add a tag to the *merge-commit* named after the patched version.
92-
e.g If the current stable version is v2.1.0, the hotfix should make it v2.1.1 (Bump the patch number).
100+
e.g If the current stable version is v2.1.0, the hotfix should make it v2.1.1 (Bump the patch number).
93101
2. Pull-Request directly to **master**
94102

95103
The [Classic Workflow Model](http://nvie.com/posts/a-successful-git-branching-model) lists that a hotfix should be *merged* to both **master** and **develop**, however, GitHub doesn't play nicely with this exact model and basically allows only one of the branches to exist in such a workflow that respects *Pull-Requests* (Instead of *merges*) on one side, and the Workflow model on another.
96104

97-
**Note to Maintainers/Collaborators:**
105+
**Note to Maintainers/Collaborators:**
98106
If an active **release** branch exists when the hotfix is integrated, meaning there's an on-going release, the hotfix should be also be *merged* to the **release** branch, optionally from the **master** branch if a *merge* from the hotfix branch isn't possible.
99107

100-
##### Development Bugs
108+
##### Development Bugs #####
101109

102110
These exist in **feature** branches or the **master** branch - Code that's planned for future releases and considered in development.
103111
However, these still need to be reported by submitting relevant issues. You should also specify if your'e attempting to fix them.
104112

105113
Fixes to such bugs should be made on a separate branch, preferably in a forked version, named after the bug. Once finished, you should PR it to the appropriate **feature** branch or directly to the **master** branch - depending on where you found them.
106114
If the **feature** branch has already been merged to **master**, you should simply PR directly to **master**.
107115

108-
#### New Features
116+
#### New Features ####
117+
109118
To ensure your contribution makes it into the mainline codebase, always check the **master** branch for the next targeted release.
110-
Make sure your contribution is on par with that branch, then PR directly into **master**.
119+
Make sure your contribution is on par with that branch, then PR directly into **master**.
111120
This strategy should be the right one for most users.
112121
If you want to make further additions to a feature currently under development, you can also PR into the corresponding **feature** branch.
113122

114-
##### Feature Branch Naming
123+
##### Feature Branch Naming #####
115124

116125
**Feature** branch names should be short and descriptive, each word separated by a single hyphen (`-`).
117126
e.g A branch named `feature/blacklisting-libraries-to-avoid-automatic-inclusion-when-reloading-cmake` is a bad branch name because it's too long, even though it's very descriptive.
118127
A better name would be `feature/library-blacklist` because it's short and generally descriptive.
119128

120129
Any further description would be written in commit messages or the final PR to the **master** branch.
121130

122-
#### Releases
131+
#### Releases ####
123132

124133
When a handful of features is complete, the developed product is ready for release.
125134
According to our [Workflow model](#Project-Workflow), every release should start with a branch named after the *about-to-be-released* version. e.g `release/2.0.0`.
126135

127136
There are some strict rules we apply to our releases:
128137

129-
* At any given moment there should be a <u>single release</u> **or** <u>no release at all</u>.
138+
* At any given moment there should be a *single release* **or** *no release at all*.
130139
We're not working Agile on this project, thus there's no need for multiple simultaneous releases.
131140
* Once existing, any hotfix should be merged to the **release** branch as well as to the **master** branch (See [Release Bugs](#Release-Bugs/Critical-Bugs)).
132-
* Any last-minute bug-fixes should be made directly on the **release** branch.
141+
* Any last-minute bug-fixes should be made directly on the **release** branch.
133142
They will be merged later to the **master** branch once the release is completed.
134-
* New features developed after the release has been started are intended for the <u>**next** release</u> - They should be merged only to the **master** branch!
135-
* Before completing the release:
143+
* New features developed after the release has been started are intended for the _**next** release_ - They should be merged only to the **master** branch!
144+
* Before completing the release:
136145
* Documentation should be up-to-date (Currently maintained in GitHub Wiki)
137146
* **Changelog** file should be updated accordingly
138147
* **Authors** file should be updated accordingly
139148

140149
Once the release is complete it is merged to the **master** branch.
141150
A tag with the final release version is also added to the *merge-commit* on **master**.
142151

143-
### Pull Requests
152+
### Pull Requests ###
144153

145154
At GitHub we support merging by Pull-Requesting.
146155
It helps us document code better, as well as discussing and reviewing a change before it gets into the mainline codebase.
147156

148-
Please make a Pull Request for every change you'd like to make, yes, <u>even if your'e an maintainer or a collaborator</u>.
157+
Please make a Pull Request for every change you'd like to make, yes, *even if your'e an maintainer or a collaborator*.
149158

150159
Also note that we do have a strict rule about the branch your'e PRing from - Once it gets merged, it will be probably get deleted. This is done to avoid unnecessary cluttering of the project.
151160
If you need to keep the branch for some reason, please state it in **bold** in the PR's description, so that the merging user will notice it.
152161

153-
### Breaking Changes
162+
### Breaking Changes ###
163+
154164
Breaking changes require the release of a new major version according to [semantic versioning](#Versioning) rules.
155165
If your'e making changes to the **public** interface (API) that are not backwards-compatible, make sure it is **absolutely** necessary.
156166

157-
### Changelog
167+
### Changelog ###
168+
158169
All project changes, new features and bug fixes are documented in `CHANGELOG.md`.
159-
<u>**Maintainers**</u> - For any contribution, please add a corresponding changelog entry.
170+
**Maintainers** - For any contribution, please add a corresponding changelog entry.
160171
Bump the patch version for bug fixes and the minor version for feature additions.
161172
Don't **ever** bump the major version on your behalf - It should be done only by the maintainers of the project.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ Wait - Hasn't it been possible all this time? Apparently not. You can read more
1212
**Arduino-CMake** should<sup id="fl1">[1](#f1)</sup> do almost<sup id="fl2">[2](#f2)</sup> <u>anything</u> that the **Arduino IDE** does!
1313
Here's a list of features **already supported** by **Arduino-CMake**:
1414

15-
- Creating Arduino "Executables"/Programs
16-
- Uploading programs to hardware boards
17-
- Adding/Finding and using Arduino Libraries
18-
- 3rd Party libraries are fully supported
19-
- User libraries which are not Arduino Libraries are also supported
20-
- Using Arduino example programs
21-
- Using Arduino library example programs
22-
- Attaching Arduino sketches (`.ino` files) to programs
15+
* Creating Arduino "Executables"/Programs
16+
* Uploading programs to hardware boards
17+
* Adding/Finding and using Arduino Libraries
18+
* 3rd Party libraries are fully supported
19+
* User libraries which are not Arduino Libraries are also supported
20+
* Using Arduino example programs
21+
* Using Arduino library example programs
22+
* Attaching Arduino sketches (`.ino` files) to programs
2323

2424
Moreover, **Arduino-CMake** allows some things that **Arduino IDE** *doesn't*:
2525

26-
- Developing Arduino programs in any IDE or text editor
27-
- Completely customizing the build process per user's requirements
26+
* Developing Arduino programs in any IDE or text editor
27+
* Completely customizing the build process per user's requirements
2828

2929
What's **not** supported?
3030

@@ -76,9 +76,9 @@ And yet, it still had its own problems, leading once again to an abandoned state
7676

7777
Then, in 2018, an extreme effort has been made and the project has been completely rewritten (mostly by [MrPointer](https://github.com/MrPointer)) with a few very clear goals in mind:
7878

79-
- **Platform-Independent** - The framework shouldn't assume it works only with the basic Arduino platform, as there are many others out there. Any platform that confront to the design of the basic Arduino SDK is appropriate for use. An example of such a platform is ESP32.
80-
- **Modern CMake** - All previous projects/forks have been using the fairly old CMake 2.8. CMake itself has transitioned much from version 2 to 3, benefiting from a whole lot of new exciting features. Even the official package managers support CMake 3 versions, so there's no excuse to not use it.
81-
- **Modern Arduino SDK** - The Arduino SDK, much like CMake, has also undergone several major changes during the years, especially with version 1.6. The Arduino SDK has only recently got stable, and that's why we recommend always having the latest version installed, although we do have some minimum requirements for the framework to even work. You can find them at the Requirements section.
79+
* **Platform-Independent** - The framework shouldn't assume it works only with the basic Arduino platform, as there are many others out there. Any platform that confront to the design of the basic Arduino SDK is appropriate for use. An example of such a platform is ESP32.
80+
* **Modern CMake** - All previous projects/forks have been using the fairly old CMake 2.8. CMake itself has transitioned much from version 2 to 3, benefiting from a whole lot of new exciting features. Even the official package managers support CMake 3 versions, so there's no excuse to not use it.
81+
* **Modern Arduino SDK** - The Arduino SDK, much like CMake, has also undergone several major changes during the years, especially with version 1.6. The Arduino SDK has only recently got stable, and that's why we recommend always having the latest version installed, although we do have some minimum requirements for the framework to even work. You can find them at the Requirements section.
8282

8383
### How it works
8484

@@ -89,7 +89,7 @@ But what's really useful in CMake, at least regarding our Arduino world, is the
8989
The Arduino SDK, which one usually downloads together with the Arduino IDE, is actually also a toolchain, as it includes the required compilation & linkage tools for cross-compiling.
9090
Analyzing the SDK allows us to build a framework using this toolchain, and also all of Arduino's other cool features such as *libraries, examples*, etc.
9191

92-
### What is NG?
92+
### What is NG
9393

9494
NG stands for "New Generation".
9595
Inferred from the written above, it can easily be understood why the project has this name.

cmake/Platform/Libraries/LibrarySourcesArchitectureResolver.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ endfunction()
3131
#=============================================================================#
3232
function(resolve_library_architecture _library_sources _return_var)
3333

34+
if(NOT _library_sources)
35+
return()
36+
endif()
37+
3438
cmake_parse_arguments(parsed_args "" "LIB_PROPS_FILE" "" ${ARGN})
3539

3640
if (parsed_args_LIB_PROPS_FILE) # Library properties file is given

0 commit comments

Comments
 (0)