[CMake] system script integration

Andreas Mohr andi at lisas.de
Fri Dec 24 03:56:20 EST 2010


On Thu, Dec 23, 2010 at 09:11:53AM +0000, Mike McQuaid wrote:
> On 22 December 2010 22:24, Andreas Mohr <andi at lisas.de> wrote:
> > To put it simply, I was just not happy the entire time while
> > trying to implement this and not finding any satisfying (well-crafted) solution,
> > only ugly, very bad or semi-failing workarounds.
> > That kind of work should be _fun_, especially when it then results in a
> > nicely working and fully automated result. It plain wasn't.
> 
> It's hard to understand exactly what your problems are other than just
> learning CMake. I suggest you make a new thread and try and explain
> these clearly, it's pretty hard to try and help from your previous
> descriptions.

Indeed, I probably shouldn't have hijacked the thread like that
(I didn't really expect anyone to actively help on my listing,
I just intended to provide a live and breathing example of the status quo ;)
And of course I didn't have the actual implementation at hand, merely
a recollection that was sufficient to demonstrate the issues.


The one question that probably should be asked after my mail:
which is the essential part that was showing lacking support in my sample?
I believe it's foreign scripting support:
there should be sufficient builtin support for system scripts to be
executed easily (e.g. to integrate parts common with other build systems
one may be using and thus be able to keep them deployed with several systems).
And this likely boils down to lacking dos2unix-type integration
(provided via a /usr/share/cmake../Modules/ helper),
since all the other parts (file(WRITE), or using script templates via
configure_file() etc.) can be deemed sufficient I believe.

The ensuing question would be:
can (and should!?) this file write / configure file / dos2unix op
handling for script preparation be made a suitable one-liner
for easy integration?
Since there are quite specific (and limited) needs
for execution of system scripts (shell, perl, python, ...)
it might be a good idea to provide a generic yet simple helper
function.

Andreas Mohr


More information about the CMake mailing list