-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[csolution] Investigate new CMakeLists.txt
generation
#1044
Comments
CMakeLists.txt
generationCMakeLists.txt
generation
During the meeting today, I mentioned the following ideas/remarks:
|
The first results of the investigation have been captured in the document below alongside a practical example: Comments, questions, remarks, all sorts of feedback are much appreciated. |
I find it very difficult to use CMSIS using Cmake. Is it possible download CMSIS and build natively with Cmake? Top results in google lead to Real-life use case: Getting CMSIS to work with Cmake based project is painful and prevents us from using nice projects like arm-2d that depends on CMSIS. |
@tomoveu Thanks for the feedback. |
Hi, The architecture proposed in this issue look much closer to idiomatic CMake code (vs the current So, big 👍 there. However, I agree with @Torbjorn-Svensson's views from earlier in this thread, notably on this point:
I don't think it's a good idea to allow several toolchains in the same CMake project. It may lead to issues at compile-, link-, or run-time that are often very obscure and hard to debug. |
It's a good idea to align the models and I believe that it would be really beneficial to try to align the model as much as possible with CMake as possible. For me, this translates into a 1-to-1 relation between the csolution.yaml and the CMakeLists.txt, i.e, keeping a combined CMakeLists.txt for all projects and configurations. This will allow cmake to keep track of interproject dependencies out of the box and aligns the csolution model more with CMake. Moreover, I believe that mixing toolchain is a really poor choice. Keeping one single CMakeLists.txt for the entire project will also align the toolchain usage and help with possible problems that may arise if different subparts are built using different compilers. |
Moreover, many modern IDE:s utilize CMakes file apis to drive the UI, e.g., CLion uses this but this requires a unified cmake project for the entire csolution. Creating a single CMake file for the entire project will automatically give support for the CMSIS Toolbox concept in such environment as well |
The investigation is concluded, the work packages will be defined and tracked in #1237. |
In
csolution
it's possible to describe several projects andbuild-types
/target-types
resulting in severalcontexts
and several build artifacts which may have inter dependencies.Instead of extending the CPRJ specification (#171) we have decided to establish a new format, the cbuild.yml, and to re-implement the CMakeLists.txt generation.
In this scenario the following topics must be investigated:
The text was updated successfully, but these errors were encountered: