But if you do this, it's sort of an #include <everythingwehave>
There is no way to control which dependencies a module sees and needs. It would result in every module referencing every dependency any module needs to add to the pool. Chris Am 27.05.19, 11:18 schrieb "Markus Sommer" <som...@isb-fn.de>: Hello, Chris, you generate a target/dependencies folders for each module (api, logger, driver-base, etc.). I mean, we generate a target/dependencies at the plc4cpp level and combine all libs and includes of the plc4cpp modules and external modules like Boost. Each individual module would then fetch from before the include and libs. Best regards Markus Freundliche Grüße Markus Sommer Geschäftsführer isb innovative software businesses GmbH Otto-Lilienthal-Strasse 2 D - 88046 Friedrichshafen Tel.: +49 (0) 7541 3834-14 Mob: +49 (0) 171 537 8437 Fax: +49 (0) 7541 3834-20 E-Mail: som...@isb-fn.de Web: www.isb-fn.de Geschäftsführer: Markus Sommer, Thomas Zeler Sitz: Friedrichshafen Registergericht: Amtsgericht Ulm HRB-Nr. 631624 Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you. -----Ursprüngliche Nachricht----- Von: Christofer Dutz <christofer.d...@c-ware.de> Gesendet: Montag, 27. Mai 2019 10:38 An: dev@plc4x.apache.org Betreff: Re: [C++] Getting the logger module working? Hi Markus, I would be able to help, if you stop by in Frankfurt ... but I would prefer to discuss anything we would be thinking about here on the list. Ideally meeting won't be necessary in the end as we sorted all the problems. Isn't that what I'm currently doing in the build? It automatically builds something, in the end it creates a zip file containing the includes and the compiled libs. These are then unpacked before building a module that depends on them. So this copying and packing is already handled by Maven automatically. We have to keep in mind that we still have to be able to release the software and that we still have to be able to generate the code for the drivers and this code-generation has to be integrated into the build. I am open for alternatives. If you can provide one that addresses these concerns, sure, we can change things. Chris Am 27.05.19, 10:31 schrieb "Markus Sommer" <som...@isb-fn.de>: Hello, Chris, we can meet in Frankfurt, when I get back to the north. If we see each module ourselves, we would also have to copy the libs and header files from the individual plc4cpp modules to the others. What do you think about not doing these dependencies for each module, but simply seeing all modules as a whole module plc4cpp and copying the header files into a common dependencies. At the end there is a directory "target" under plc4cpp and there the header file and libs come in. Then the philosophy is not 100% covered, but nearly. What do you think, especially Björn, Julian? Best regards Markus Freundliche Grüße Markus Sommer Geschäftsführer isb innovative software businesses GmbH Otto-Lilienthal-Strasse 2 D - 88046 Friedrichshafen Tel.: +49 (0) 7541 3834-14 Mob: +49 (0) 171 537 8437 Fax: +49 (0) 7541 3834-20 E-Mail: som...@isb-fn.de Web: www.isb-fn.de Geschäftsführer: Markus Sommer, Thomas Zeler Sitz: Friedrichshafen Registergericht: Amtsgericht Ulm HRB-Nr. 631624 Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you. -----Ursprüngliche Nachricht----- Von: Christofer Dutz <christofer.d...@c-ware.de> Gesendet: Montag, 27. Mai 2019 10:18 An: dev@plc4x.apache.org Betreff: Re: [C++] Getting the logger module working? Hi Markus, I did talk to you about this in our last session. And it once worked while we did it in Stuttgart. You introduced the problems by dropping code you didn't test with our primary build system, which is Maven. And it's not really a fun trip for me to travel to Stuttgart cause it takes me about 6 hours of travelling, so I would rather not do this over and over again. And it's not quite the Apache way to do these private one-to-one meetups. I would be happy if we stared discussing C++ related things on this mailing-list, as we are discussing all the other ones. Feel free to sign-up to our plc4x slack channel if you prefer that, but we should only use this for chats, fun and informal discussions. The deeper discussions should happen here. Right now the primary build system is Maven and the aggregational CMake files were a convenience to help use other IDEs (VisualStudio, CLion, ...). The problem is, that if we don't do this, we will be having big problems when starting to generate drivers. I would not really like to develop a plugin for each build system. In maven it's considered absolute bad practice to reference resources outside the maven module ... so the referencing stuff "../../../src/main/cpp" is not a good thing. That's why I introduced the packaging and the unpacking in the build as this allows to add a maven dependency to the pom and the managing of the links to dependencies is handles as all dependencies are located in the same directory. So this simplifies the management of the CMakeFile.txt as you only need one entry for all dependencies: target/dependencies/include So if you have a better suggestion how to manage the dependencies and the driver generation in the future, I'm open for this. Otherwise I would like to keep things the way I set them up. I know that with C# and Python we will be having exactly the same problems ... but at least for C++ I had thought I had solved them. Chris Am 27.05.19, 09:54 schrieb "Markus Sommer" <som...@isb-fn.de>: Hello, Chris, I looked at the pom.xml on the weekend. To resolve the dependencies towards Boost, a local duplicate is created in the Dependencies folder. The duplicate is then created for each module. To include Boost in CMake you can use the following in the top level: set(BOOST_ROOT "./libs/boost/target/boost_1_70_0/") set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) find_package(Boost COMPONENTS filesystem log REQUIRED) In the sub CMakes Boost can then be used as follows: TARGET_LINK_LIBRARIES (plc4cpp-utils-logger ${Boost_LIBRARIES}) target_include_directories (plc4cpp-utils-logger PUBLIC ${Boost_INCLUDE_DIRS}) Duplication of the code is then no longer necessary. @Chris: I think we should solve the topic pom.xml together in one appointment (Stuttgart?). The errors in the cpp files I have just made a commit to the branch "develop". Best regards Markus Translated with www.DeepL.com/Translator Freundliche Grüße Markus Sommer Geschäftsführer isb innovative software businesses GmbH Otto-Lilienthal-Strasse 2 D - 88046 Friedrichshafen Tel.: +49 (0) 7541 3834-14 Mob: +49 (0) 171 537 8437 Fax: +49 (0) 7541 3834-20 E-Mail: som...@isb-fn.de Web: www.isb-fn.de Geschäftsführer: Markus Sommer, Thomas Zeler Sitz: Friedrichshafen Registergericht: Amtsgericht Ulm HRB-Nr. 631624 Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete his e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank you. -----Ursprüngliche Nachricht----- Von: Christofer Dutz <christofer.d...@c-ware.de> Gesendet: Donnerstag, 23. Mai 2019 13:43 An: dev@plc4x.apache.org Betreff: [C++] Getting the logger module working? Hi all (especially Markus), I noticed that I had to disable the compilation of the logger module in the plc4cpp as I am getting errors. Would be great if you could look into them. In order to do this, you need to comment in the cmake-compile execution in: plc4cpp/utils/logger/pom.xml I tried finding out what’s wrong, but gave up in the end. Chris