This repository was archived by the owner on May 1, 2024. It is now read-only.
[WIP] cmake structure for ecl#355
Closed
Stifael wants to merge 30 commits intoPX4:masterfrom
Closed
Conversation
define with static const;
this is a duplicate of the same functionality of matrix is_finite.
Limits: remove reference return
Contributor
|
I guess #432 replaced this one... Please reopen if it's not the case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is based on this issue. The goal of this PR is to make each library within ecl as independent from other libraries as possible to make it easier for other projects outside of PX4 to incorporate ecl into their project. Moreover, a cmake structure was chosen that agrees with modern cmake suggestion from here and here. Doing so enables better cmake maintainability within and outside of the project.
To build the project do the following:
within ecl:
mkdir buildcd buildcmake ../srcmakemake testThe project structure follows a standard cmake structure with having out of source build:
-build
-src
----CMakeLists.txt
----ekflib
----geolib
-----L1lib
-----mathlib
-----tecslib
-----matrixlib
-----tests
where each lib has the following structure following the include name-space construct.
-----namelib
--------CMakeLists.txt
--------include
-------------namelib
----------------name.h
--------src
------------cpp- and h-files
The exception is of course matrixlib, which is a submodule and therefore has its own structure.
In contrast to the suggestion of here, attitude_fw is not a separate library within ecl. The main reason is the strong dependency on PX4 and therefore it makes more sense to add it to PX4 project directly.
In addition, I created a separate library for math function (mathlib), which contains the math functions from px4 mathlib here without the Quaternion and Matrix related files, which is part of matrixlib. The main reason for creating a separate library for math functions is because there are and will be new flight control related SISO math functions which need to live somewhere, but currently it is not clear where to put them. I personally do not think it makes sense to put SISO math functions into matrix, since I still consider it as a library for vector operations.
I also added google-tests, which allows to make use of mock objects.
What still needs to be done: