Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [4diac-dev] Exported functionblock files and CMakeLists.txt

Amazing! It looks really simple. I like it!

Jose Cabral

-- 
fortiss · Landesforschungsinstitut des Freistaats Bayern
An-Institut Technische Universität München
Guerickestraße 25 
80805 München
Germany
Tel.: +49 (89) 3603522 529
Fax: +49 (89) 3603522 50 
E-Mail: cabral@xxxxxxxxxxx
https://www.fortiss.org/

Amtsgericht München: HRB: 176633
USt-IdNr.: DE263907002, Steuer-Nr.: 143/237/25900
Rechtsform: gemeinnützige GmbH
Sitz der Gesellschaft: München
Geschäftsführer: Dr. Harald Rueß, Thomas Vallon
Vorsitzender des Aufsichtsrats: Dr. Manfred Wolter


> -----Ursprüngliche Nachricht-----
> Von: 4diac-dev-bounces@xxxxxxxxxxx <4diac-dev-bounces@xxxxxxxxxxx> Im
> Auftrag von Ernst Blecha
> Gesendet: Donnerstag, 18. Juni 2020 15:41
> An: 4diac-dev@xxxxxxxxxxx
> Betreff: Re: [4diac-dev] Exported functionblock files and CMakeLists.txt
> 
> Hi,
> 
> 
> --
> 
> Ernst Blecha
> LIT | Cyber-Physical Systems Lab
> 
> JOHANNES KEPLER
> UNIVERSITY LINZ
> Altenberger Straße 69
> LIT Open Innovation Center
> 4040 Linz, Austria
> ernst.blecha@xxxxxx
> www.jku.at
> 
> >>> Jose Cabral <cabral@xxxxxxxxxxx> 06/18/20 6:14 AM >>>
> > Hi,
> >
> > I really like the idea of automating this phase. Maybe a middle point
> > could be to have the contents of this CMakeLists.txt file as a CMake
> > function in forte. Then in the IDE you could have the option to export
> > the CMakeLists.txt file for a module (together with the Function Block
> > exporter, or as a standalone, and warning of
> > overwriting) and the user just needs to set the name of the Module (if
> > not provided, maybe like you did, take it from the folder name).
> 
> Yes, this is a possible application.
> 
> 
> I am using the directory name because that already has to be chosen during
> export and does not add an additional grouping the user has to remember
> and match to the symbol names in CMake.
> 
> > The exported CMakeLists.txt will call the function you created,
> > basically adding all the .cpp and .h files.
> >
> > If the module needs extra CMake commands (adding libraries, setting
> > variables, ...), the user will just edit the generated file once
> > (leaving the call to your function). The next time that more function
> > blocks are exported to the module, the CMakeLists.txt doesn't need to
> > be exported anymore, and since your function includes all .cpp and .h
> > files, nothing else needs to be done.
> >
> > One suggestion: I think it will be better to use
> > forte_add_sourcefile_h, forte_add_sourcefile_c and
> > forte_add_sourcefile_cpp instead of forte_add_sourcefile_hcpp, so the
> > function will include all compilable files in the folder, and you can
> > just drop files to the folder and they will be compiled.
> 
> Thank you for those suggestions, i tried to work them into the file.
> Also i tried to incorporate Joergs comment about "less code"; Assuming that
> it would be possible to add all the "helper" functions into the forte
> distribution the resulting file could like the attached example (except the
> INCLUDE-line)
> 
> Best regards,
> Ernst

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top