[CMake] Fwd: equivalent cmakelist for this file

ankit jain ankitguddu at gmail.com
Tue Feb 3 00:16:13 EST 2009


2009/2/3 Philip Lowman <philip at yhbt.com>

>   On Mon, Feb 2, 2009 at 11:31 PM, ankit jain <ankitguddu at gmail.com>wrote:
>
>>
>>
>>  ---------- Forwarded message ----------
>> From: ankit jain <ankitguddu at gmail.com>
>> Date: 2009/2/2
>> Subject: Re: [CMake] equivalent cmakelist for this file
>> To: Bill Hoffman <bill.hoffman at kitware.com>
>>
>>
>>
>>
>>  2009/2/2 Bill Hoffman <bill.hoffman at kitware.com>
>>
>>  ankit jain wrote:
>>>
>>>> The objective here to include all the .desc files in the cmakelist and
>>>> when we make it it should generate the executable for it like if we include
>>>> abc.desc then after make it should generate a file abc which is executable
>>>> and a script which has test cases but generated by .desc file only. In order
>>>> to achieve that guide me how to write cmake list file for it so that it wiil
>>>> produce equivalent behaviour as normal make does using unix makefiles.
>>>>  When we make to the unix makefiles it is generating the equivalent
>>>> executable mentioned inthat .desc file.
>>>>  I want to achieve that through Cmakelist files.
>>>>
>>>>
>>>
>>> I am still not really sure what is in a .desc file.  Please restate your
>>> problem as if the .desc file did not exist.
>>>
>>> Something like:
>>>
>>> I want a cmakelists file that does this:
>>>
>>> 1. ...
>>> 2. ...
>>>
>>>
>>> Basically describe the functionality you want without describing the
>>> current makefile implementation of that functionality.  The currently
>>> implementation is most likely irrelevant to the cmake solution to the
>>> problem.
>>>
>>> -Bill
>>>
>> Actually these .desc file contain only one line as:
>> $exec_string = "./abc"
>>
>> This abc contain shell script code.
>> Actually the cmakelist file should do:
>> 1. this functionality to create ./abc this file should generate after
>> running make.
>>
>> since this line is written in desc files thats why i write this to you.
>>
>> You tell me how to create that using cmakelist file.
>>
>
> Ankit,
>
> More information is needed.  You can use the ADD_CUSTOM_COMMAND cmake
> command to run custom scripts but you need to clarify a bit further.  You
> mention "this functionality to create ./abc this file should generate after
> running make".  This isn't clear at all.  Are you trying to create a shell
> script (abc) with CMake code or do they already exist?  If they already
> exist you could parse the contents of the desc files using FILE(READ... and
> STRING(REGEX... but there may be a far easier solution to your problem.
> Without knowing what a "desc" file is or what these shell scripts do it's
> unlikely anyone's going to be able to offer any useful suggestions for you
> on this mailing list.
>
> --
> Philip Lowman
>

Suppose in unix makefile it is written like this:
$exec_string="./abc"

what i should write in cmakelist file so that what this command do same
thing happen after doing make. My purpose is to generate a file abc which
has some shell script code. this file not already exist in the folder but
should be generated on make.

Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090203/9afc80b5/attachment-0001.htm>


More information about the CMake mailing list