Re: how to build generated sources in parallel with out linking them together?
Am Mittwoch, 21. Februar 2007 23:31 schrieb Thiago Macieira: Alexander Neundorf wrote: If I link some compiled headers without -no-undefined, it seems to work. Am I missing something ? Basically we want to: == #define QT_NO_CAST_FROM_ASCII #define QT_NO_CAST_TO_ASCII #define QT_NO_KEYWORDS #define signals choke #define slots choke #define foreach choke #define forever choke #include headername static void dummy() { } = and make sure that that compiles with Dirk's usual very strict compiler switches (-pedantic -ansi -Wall -W -Werror, etc.) Since that's just an empty file and will produce hardly any symbols, there's no need to link. It's even worse. Linking will break in some cases Greetings, Stephan ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
Am Donnerstag, 22. Februar 2007 00:21 schrieb Brad King: For the VS IDE generators there does not seem to be a way to compile sources without archiving them, but since the objects contain only a few symbols they should not be too big. It's not necessary to do this for any but one platform, so this is ok. Greetings, Stephan ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
Stephan Kulow wrote: It's even worse. Linking will break in some cases Oh? I would think they should all compile and link. What were those linking errors? Were they justified? -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 pgpy3O5TXJ27r.pgp Description: PGP signature ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
Am Donnerstag, 22. Februar 2007 10:51 schrieb Thiago Macieira: Stephan Kulow wrote: It's even worse. Linking will break in some cases Oh? I would think they should all compile and link. What were those linking errors? Were they justified? I'm not expert enough to tell you if they are justified, but KHttpCookieList (which is defined in an internal header I excluded later from checking) complained that it's missing Q3Glist definition Greetings, Stephan ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
On Thursday, 22. February 2007 10:51, Thiago Macieira wrote: What were those linking errors? Were they justified? In some cases, they are, like for example virtual inline functions. In some other cases, they were not (missing #include caused gcc to interpret type attributes as instantiation names). Overall the idea of building them in-place has to be scratched, #include .. vs doesn't have the right meaning. I've written a 6 line gnu makefile that does the same thing and added it to the dashboard. (its not yet causing an error though because I first want to make sure that kdelibs passes before enabling it). Dirk ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
how to build generated sources in parallel with out linking them together?
Hi, coolo and I are wondering how to add a custom target, that when invoked, builds a lot of generated sources (consisting of a couple of custom compile defines and an include statement) in parallel (up to the usual make -j parallelism level) and does not link them together (because linking does not work). any idea how to do that with cmake? we've tried to define sources and add_executable (which however links and does not work), and we've tried to add a custom target that depends on the object files (which does not work because the object fiels are not compiled) and we've tried checkcxxsourcecompiles (which does not work because it is not done parallel). So... ? Dirk ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
Am Mittwoch, 21. Februar 2007 15:02 schrieb Dirk Mueller: Hi, coolo and I are wondering how to add a custom target, that when invoked, builds a lot of generated sources (consisting of a couple of custom compile defines and an include statement) in parallel (up to the usual make -j parallelism level) and does not link them together (because linking does not work). any idea how to do that with cmake? we've tried to define sources and add_executable (which however links and does not work), and we've tried to add a custom target that depends on the object files (which does not work because the object fiels are not compiled) and we've tried checkcxxsourcecompiles (which does not work because it is not done parallel). So... ? I set the LINKER_FLAGS now to -v; true; which makes sure the linker does not link but returns true - and I'll end up in buildsystem hell ;) Greetings, Stephan ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
On Wednesday 21 February 2007 15:02, Dirk Mueller wrote: Hi, coolo and I are wondering how to add a custom target, that when invoked, builds a lot of generated sources (consisting of a couple of custom compile defines and an include statement) in parallel (up to the usual make -j parallelism level) and does not link them together (because linking does not work). What doesn't work ? Shouldn't it be possible to build a library out of them ? Bye Alex -- Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de Home: neundorf AT kde.org- http://www.kde.org alex AT neundorf.net - http://www.neundorf.net ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
Am Mittwoch, 21. Februar 2007 18:41 schrieb Alexander Neundorf: On Wednesday 21 February 2007 15:02, Dirk Mueller wrote: Hi, coolo and I are wondering how to add a custom target, that when invoked, builds a lot of generated sources (consisting of a couple of custom compile defines and an include statement) in parallel (up to the usual make -j parallelism level) and does not link them together (because linking does not work). What doesn't work ? Shouldn't it be possible to build a library out of them ? The work build here is completely useless - what is building a library? to me it's linking - and this is exactly what we want to avoid. We're only interested in the compiling. BTW: is it possible to INCLUDE() a generated file? I wasn't able to write a custom command/target that would generate an include statement. Greetings, Stephan ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
On Wednesday 21 February 2007 20:18, you wrote: Am Mittwoch, 21. Februar 2007 18:41 schrieb Alexander Neundorf: On Wednesday 21 February 2007 15:02, Dirk Mueller wrote: Hi, coolo and I are wondering how to add a custom target, that when invoked, builds a lot of generated sources (consisting of a couple of custom compile defines and an include statement) in parallel (up to the usual make -j parallelism level) and does not link them together (because linking does not work). What doesn't work ? Shouldn't it be possible to build a library out of them ? The work build here is completely useless - what is building a library? to me it's linking - and this is exactly what we want to avoid. Ok, why ? We're only interested in the compiling. BTW: is it possible to INCLUDE() a generated file? Generated how ? FILE(WRITE ...), COBNFIGURE_FILE() or by some other tool ? Bye Alex -- Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de Home: neundorf AT kde.org- http://www.kde.org alex AT neundorf.net - http://www.neundorf.net ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
On Wednesday 21 February 2007, Stephan Kulow wrote: Ok, why ? a) because we're really only interested in compiling the include statement b) linking simply does not work with these object files It might help to give Alex the context: this is about automatically testing that the public headers are self-contained, by compiling them one by one separately. -- David Faure, [EMAIL PROTECTED], sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org). ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
On Wednesday 21 February 2007, Alexander Neundorf wrote: If I link some compiled headers without -no-undefined, it seems to work. Yeah; it's probably a waste of time though ;) They don't need to be linked at all ;) -- David Faure, [EMAIL PROTECTED], sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org). ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: how to build generated sources in parallel with out linking them together?
Thiago Macieira wrote: Since that's just an empty file and will produce hardly any symbols, there's no need to link. One solution is to build the sources in a static library. The archiver does not care about symbol resolution since it does not really link anything: ADD_LIBRARY(check_compile STATIC src1.cxx src2.cxx) In order to avoid the time actually spent archiving you can remove the object files from the link rule: STRING(REGEX REPLACE OBJECTS[^]* CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY}) which causes the target to be created as an empty archive for all the Makefile generators. This should be done in its own subdirectory though so that the link rule is not broken for other directories. For the VS IDE generators there does not seem to be a way to compile sources without archiving them, but since the objects contain only a few symbols they should not be too big. -Brad ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem