-
Notifications
You must be signed in to change notification settings - Fork 2
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
Template server: some improvements #125
Comments
@ckampm Please have a look at this ticket, maybe you have something to add? |
The implementation ticket #64 for the template server is not finished yet. In that sense, I see these points as additional requirements. I think the points regarding ApplicationCore should all be included. That ticket also is a base for a generic device-to-control system server, #23. The points about publishing server and config versions should become follow-up tickets of #64. I partly disagree on the points regarding CMake. While implementing the template to it's current state, I was experimenting with arrangement of the files. I don't consider it final. I personally like having I think both ways to go have their pros and cons and it comes close to a matter of taste. So we should agree on one solution and use that one. It does not have to be the current way because our |
I don't care so much about CMakeLists.txt in subdirectories, but:
The arguments are aiming at a different scenario. We have to maintain many similar projects. If we follow that recommendation and name all source files explicitly in our CMakeLists.txt, it greatly reduces the possibilities to use common macros for all projects. It is simply more work to maintain that stuff. Why shall we not let
Yes, but you have to change the scheme what to but in which library. You will quickly see, that suddenly the subdirectory structure does no longer match the structure of the produced binaries. Either you have to change the subdirectory structure, or the CMakeLists.txt in the subdirectories will become really hard to understand...
That didn't work for me, at least not when running them naively manually. And I don't want to reconfigure QtCreator everytime for this, this is just unnecessarily annoying (even if of course possible, but why do you want this?).
Avoiding manual work is not a matter of taste. It's a must for us. We have too many projects.
My only condition is: Reduce manual work as much as possible. This means: config files and tests in the same directory, and no need to put all source file names explicitly into the CMakeLists.txt. Also everything complicated should go into macros, so the CMakeLists.txt becomes only a few lines long and only contains essential information which actually differs for all projects.
I am perfectly fine with using modern cmake features, but the above conditions are more important. In fact I would not consider something "modern" if it involves more manual work. |
I completely agree with @mhier In addition, you have to run cmake manually anyway if you update the config files for testing. This does not go away, even if you list them because CMake does not consider them as source and does not track changes. In fact, this happens far more often than adding or removing a C++ source file. |
Besides, we actually moved away from mentioning source files individually to the use of |
(I added one point about the printed name in defineConnection()) |
now tracked in redmine #8360 |
Some aspects in the example_template are not ideally organised:
<applicationName>.dmap
<applicationName>-config.xml
<applicationName>.xlmap
(for multiple devices some suffix would be appended)executable_src
. This is important if other source files for the tests are needed (e.g. a dummy backend). This is already de-facto standard in ChimeraTK even if no other sources files are used.findTag(".*").connectTo(cs)
config.connectTo(cs)
<module name="Configuration">
defineConnections()
the server prints its version together with its name, but the name is hardcoded. This is easily overlooked. Why not use getName() to obtain the application name here?CMakeLists.txt
:aux_source_directory()
basically all explicit file names can be eliminated (already the case, at least almost). We can take the directory structure for granted, maybe even file names likeServer.cc
andApplicationInstance.cc
.CMakeLists.txt
in subdirectories, which always make it hard to find problems and has sometimes subtle side-effects.Server.cc
etc? This might lead to unnecessary recompilation of stuff for each test. Imagine having a big templated module and many tests... Only theApplicationInstance.cc
must not go into the library.The text was updated successfully, but these errors were encountered: