1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-17 05:15:23 +03:00
Commit graph

8 commits

Author SHA1 Message Date
Michel Pastor
fc0e5e2741
Get setting default values from settings.yaml (#6595)
* Get setting default values from settings.yaml

* settings: Make the generator more robust and versatile

- Add support for resolving types and values in multiple compilers
- Add support for resolving types and values in clang 10
- Add support for using the host compiler for resolving the settings

This allows us to run the generator for the unit tests, since they now
need the settings_generated.h file to get the default setting values
from it.

* Fix regexps in settings.rb and add execution bit

* Fix git revision issue

* Fix issue with settings validation

* Fix issue with targets not defining USE_MAG

Co-authored-by: Alberto García Hierro <alberto@garciahierro.com>
2021-04-07 17:48:09 +02:00
Alberto García Hierro
55943a0630 [SETTINGS] Cleanup the settings generator a bit
- Don't include target.h explicitely, it's already included
by platform.h
- Fix an error in compiled file as a test for discovering
contstants. Since we rely on compiler errors to give us the
resolved value, that lets us get one extra value on each run
- Always compile the test files for setting discovery in c++11
even if no -std=XXX argument is passed from the caller.
2020-07-24 21:41:51 +01:00
Konstantin (DigitalEntity) Sharlaimov
b3dd3c966f [BUILD] Search for compiler also in path for settings generator. Prefer tools 2019-07-09 20:47:08 +02:00
Konstantin (DigitalEntity) Sharlaimov
cde7eb6b94 [TOOLS] Make sure settings compiler uses GCC from installed toolchain 2019-07-08 22:38:45 +02:00
Alberto García Hierro
ae01b3453a Enable -Wstrict-prototypes
Also, fix all warnings shown when it's enabled
2019-04-26 15:57:49 +01:00
Alberto García Hierro
bf0f05af5f Move build-stamp and generatic files to obj/main/$(TARGET)
This allows target level parallel builds, since now there are no
shared files between targets.

Fixes #3261
2018-05-25 11:00:12 +01:00
Michel Pastor
e2dd14cee0 Improve build system error handling 2017-11-01 19:02:22 +01:00
Alberto García Hierro
0a6328d8e8 Run the settings generator only when the build changes
A build is considered changed if either the TARGET, CFLAGS or
the #define'd constants by including target.h and platform.h change

The Makefile now runs a new tool in src/utils/build_stamp.rb which
updates the file in obj/build.stamp iff the build has changed. This
allows us to make the generated files to depend on this stamp file
rather than rebuilding them all the time. Automatic dependencies
generated by the compiler take care of recompiling just the files
which depend on the generated ones.
2017-09-30 10:08:03 +01:00