-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve cmake build system #90
Conversation
* Refactor/cleanup cmake build system * Improve cmake install target * Export targets for to include to other cmake build system
Add some additional information about cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all: Thank you for contributing to this project. We very much appreciate new members of the community. Secondly, this PR seems way too big. Could you possibly split this up into multiple PRs?
The code looks pretty good to me, but I still have some regards.
Unfortunately, yes the PR is big. The effort will be increase if I must split this PR. Maybe I found a solution of that. Let me think about that..... |
Please wait with the merge. I need to fix my review findings. Give me a day :-) |
Thanks for working on this! To answer your questions: Nothing in legacy should every see the light of day, so not exporting it is correct. And libneopg-tool exists only to allow for creating a separate testing binary that does unit testing with code from the main program. So that should be linked statically and not exported either. There was a ticket for revisiting cmake (#83). The goal is to be as "normal" as possible. I think the main painpoint is the step that collects all header files, but having the header files next to the source files and tests is important to me for navigating in the text editor, but maybe c++ developers deal with this differently? Let me know if I am missing something! |
f689ed0
to
bc3343c
Compare
Ok, this means it should also not "exported". I will remove this from the cmake install target.
No, that's ok in my opinion. It's like code formatting I think. Some would say, it is better to have source and headers separated and some are not. I am not very religious about that :-).
Otherwise it is not possible to "import" the project into the "development environment" after
|
Unfortunately to get travis running again takes more time that I expected. I see also some compile warnings and errors. |
Codecov Report
@@ Coverage Diff @@
## master #90 +/- ##
==========================================
+ Coverage 20.53% 21.09% +0.55%
==========================================
Files 294 368 +74
Lines 32779 33033 +254
==========================================
+ Hits 6732 6967 +235
- Misses 26047 26066 +19 |
Again, thanks for working on this. Everything seems fine, but I am not sure I'm 100% convinced that it is better to use subdirectories for the header files. Before this patch we're basically doing the same as Botan is doing, and it seems to work for them. The benefit of dropping the directory component: You can reorganize the files without changing the API. And the user has a bit less to copy/keep in their head. Of course, the downside is you won't notice if you use the same name twice, and the whole header copying during the build. I'm not super happy with either. OTOH, if we expect users to include only neopg/neopg.h anyway, most of this doesn't matter. Another point: If C++ modules ever arrive we might as well do now what will work best then? |
With regards to the name: See, the pressure to shorten the name conflicts with a desire to be consistent with the naming of the header files matching the class name matching the OpenPGP packet name. "A foolish consistency is the hobgoblin of little minds" 🔥 |
I guess we can redo the header file location stuff at a later time. Don't want to drag you through another round of editing and testing! |
Hi. "Oh" you merge already my PR :-), thanks but there was some missing open task that I fixed now: Don't export neopg-tool libs and headers. |
Sure, just make a new pull request. As @sphinxc0re said, it would have been preferable to separate it a bit anyway :). And wrt to the header naming, we can discuss in a ticket, sure. No pressure. Thanks again for the great work so far! |
Ok I create quickly the PRs see #92 and #93
When the conference in Berlin is over, I will be back here. |
CMAKE_INSTALL_PREFIX
)find_package(neopg)
I have following question: