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
    

Reply via email to