[CMake] @MY_VAR@ are replaced by empty string !

Bill Hoffman bill.hoffman at kitware.com
Thu Feb 14 08:45:41 EST 2008


Martin Lütken wrote:
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
> Sent: Wed 2/13/2008 7:50 PM
> To: Martin Lütken
> Cc: cmake at cmake.org
> Subject: Re: [CMake] @MY_VAR@ are replaced by empty string !
> 
> Martin Lütken wrote:
>  > SHORT:
>  > It's seems impossible to contruct a string containing something like 
> this:
>  > "@MY_VAR@". The whole thing gets replaced by an empty string regardless
>  > whether
>  > the MY_VAR variable is set or not. It is possible to create a string
>  > like "@ MY_VAR@",
>  > but that is not quite the same.
>  >
>  >
>  > ACTUAL PROBLEM DESCRIPTION:
>  > I am trying to create cmake files for Gtk+ and asssociated libs among
>  > those Pango!
>  >
>  > In order to run the glib-mkenums perl script from CMake I need to be
>  > able to contruct
>  > a custom command with strings containing the above "@MY_VAR@" construct
>  > which the script
>  > uses in a similar fashion as CMake does in it's CONFIGURE_FILE command.
>  >
>  > Any suggestions? Or do I need to file a bug-report ?
>  >
> 
> Can you use COPY_ONLY?  Or do you need to configure some variables in
> the file, just not all of them?
> 
> Actually I need that as part of running a CUSTOM_COMMAND. So I need to 
> construct parameters like that
> for a perlscript that creates c-source code from a bunch of header files.
> 

I still don't get it...   You want to run a perl script from a custom 
command, that much I get...  However, I don't know why it needs to be 
configured?

-Bill


More information about the CMake mailing list