Skip to content

Roll out new version of the project template (2018/12/15) #36

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

Merged
merged 15 commits into from
Jan 7, 2019

Conversation

claudiofantacci
Copy link
Collaborator

@claudiofantacci claudiofantacci commented Dec 15, 2018

With this PR we now have a refreshed, shiny and awesome CMake template for exporting Cpp libraries!

In particular I tried to address all the entries of #33 by

Let me know what you think and should you have any suggestion for improvements I'll try to address them asap! 👍

Closes #29, closes #30, closes #31, closes #32, closes #34, closes #35, closes #33, closes #38.

traversaro
traversaro previously approved these changes Dec 15, 2018
Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, but they are not blocking the merge at all.
Thanks a lot @claudiofantacci this is amazing!

@traversaro
Copy link
Member

By the way, I noticed that we did not mention how to handle static variables in shared libraries in Windows. Unfortunately those are not handled by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS. While the blog post that we link in the README mention that, I wonder if we should stress this more, or we can simply ignore this relatively niche use case. See ms-iot/ROSOnWindows#33 and ms-iot/ROSOnWindows#37 for a related discussion.

@claudiofantacci
Copy link
Collaborator Author

By the way, I noticed that we did not mention how to handle static variables in shared libraries in Windows. Unfortunately those are not handled by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS. While the blog post that we link in the README mention that, I wonder if we should stress this more, or we can simply ignore this relatively niche use case. See ms-iot/ROSOnWindows#33 and ms-iot/ROSOnWindows#37 for a related discussion.

Well I guess we can address this as well in this PR. I was unaware of this "obscure issues" (cit.) under Windows. I'll try to understand the content of the linked material (thanks about that!) and then I'll add one more commit to the PR.

In the meanwhile let's try to close all the ongoing discussions 👍

@claudiofantacci
Copy link
Collaborator Author

By the way, I noticed that we did not mention how to handle static variables in shared libraries in Windows. Unfortunately those are not handled by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS. While the blog post that we link in the README mention that, I wonder if we should stress this more, or we can simply ignore this relatively niche use case. See ms-iot/ROSOnWindows#33 and ms-iot/ROSOnWindows#37 for a related discussion.

Let me add one more reply about this suggestion.
I think we can give proper room to this particular use case, but it requires to change the library a little bit and probably add some more test in Appveyor.
As a matter of the fact, I would probably add a third library that would highlight this particular use case, but in another PR in the next future. What do you think about it?
We can convert your #36 (comment) into an issue for keeping the record of it 👍

@claudiofantacci
Copy link
Collaborator Author

Ping @drdanz 😁

@claudiofantacci
Copy link
Collaborator Author

I updated the PR following @drdanz suggestions.

I also added a long comment about the FIRST_TARGET option of install_basic_package_files here.
Please have a look at it and, if useful, we can polish and modify to including it as a comment of the option in install_basic_package_files itself.

Copy link
Member

@drdanz drdanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!

@claudiofantacci
Copy link
Collaborator Author

Great! Let's merge it! 🎉

@claudiofantacci claudiofantacci merged commit e23e399 into robotology:master Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment