robotology-playground / robotology-template-library

0 stars 0 forks source link

[ANNOUNCEMENT] CMAKE improver needed (we need YOU) #7

Open aerydna opened 5 years ago

aerydna commented 5 years ago

multi-trademark-fine-art-canvas-art-v8064-c3648gg-64_1000

I really, REALLY hate CMake. really. It makes me waste a lot more time then it should for the pourpose it serve. The usage is mandatory so i have to use it but i will do only the minimal cmake setup in order to be able to use the library in other project. I ask to you, cmake lover developers, to contribute to this repo and transform it in a cmake shining project. otherwise it will remain minimal. thank you in advance

1

@traversaro @drdanz @Nicogene @claudiofantacci @randaz81 @barbalberto

traversaro commented 5 years ago

I am afraid that basic knowledge of CMake is compulsory to maintain a C++ library whose build system is based on CMake.

@claudiofantacci spent a lot of time in providing good starting material to facilitate setting up a new C++ library, you can read in https://github.com/robotology/how-to-export-cpp-library#%EF%B8%8F-copy-and-customize-this-template how to start using it and customize it, even if you do not understand (initally) all of it. As documented in https://github.com/robotology/how-to-export-cpp-library#-dependencies , you can easily modify it to have an hard dependency on YCM, as suggested by @drdanz in https://github.com/robotology-playground/robotology-template-library/issues/1 .

I would be happy to answer any doubt you may have, but as the number of developers increases asking developers with CMake experience to fix on their own the CMake code in all the repositories I am afraid is not scalable.

claudiofantacci commented 5 years ago

@aerydna, just like @traversaro said, you could basically use how-to-export-cpp-library out-of-the-box. Starting from that, we can build up a lot of beutiful CMake code 👍 We are here to help and contibute! 🚀

traversaro commented 5 years ago

With respect of some years ago, the amount of good didactic material on CMake available now is amazing. I attach in the following a list of good resources, out of which I can personally recommend the book Professional CMake: A Practical Guide , that is one of the best technical books I ever read in my life, and the video lessons How to CMake good.

Useful CMake materials

aerydna commented 5 years ago

i wrote the issue AFTER i spent one hour trying to understand and adapt the example of @claudiofantacci to this library (the example was already posted by silvio in the #1 ).

I think that the process of understanding which instruction to use or how to adapt them is fine and easy but it is SLOW. it require a lot of time (hours), and in this moment for me is too much time, considering the fact that the library itself is not my main task but a cleaner way to pursue my secondary task.

In the future, if this library will become my main task (i doubt it), i'll be happy to do this time-consuming cmake learning and refinement. in the meantime would be great if someone of you think this library to be potentially useful and want to spend some of his spare time improving the cmake parts, if not is not a problem.

claudiofantacci commented 5 years ago

i wrote the issue AFTER i spent one hour trying to understand and adapt the example of @claudiofantacci to this library (the example was already posted by silvio in the #1 ). I think that the process of understanding which instruction to use or how to adapt them is fine and easy but it is SLOW. it require a lot of time (hours), and in this moment for me is too much time, considering the fact that the library itself is not my main task but a cleaner way to pursue my secondary task. In the future, if this library will become my main task (i doubt it), i'll be happy to do this time-consuming cmake learning and refinement. in the meantime would be great if someone of you think this library to be potentially useful and want to spend some of his spare time improving the cmake parts, if not is not a problem.

This reminds me the time I learnt C++ in 21 days: learncpp

Jokes aside, I can work on this as soon as I can, probably after the 20th of Febrary. I can make a first version of the repository starting from our template project, including YCM as a mandatory requirements. It should not take much time 😄

traversaro commented 5 years ago

i wrote the issue AFTER i spent one hour trying to understand and adapt the example of @claudiofantacci to this library (the example was already posted by silvio in the #1 ).

If you have a non-working adaptation of the how-to-etc-etc template to the library, I think a good first step is to just push that one one a branch, so we can provide feedback and figure out what is not working in it. For example, if this library will be an header only library, you can just look at https://github.com/robotology/how-to-export-cpp-library/blob/master/src/LibHeaderOnlyTemplateCMake/CMakeLists.txt and ignore all the other type of libraries.

aerydna commented 5 years ago

i don't have a non-working version. i stopped after one hour of adapting it since i was only at the first CMakeList and i wasted too much time on it. maybe it's only that i'm slow with cmake or that simply we're not meant for each other (me and cmake). It's the only language i ever had so many difficulties with (i use and i've used a lot of language/technology). I will face up this very hard enemy in the future, i promise.