[CMake] How to make executable depend on pre-existing control file?

Brandon J. Van Every bvanevery at gmail.com
Thu Apr 12 14:25:28 EDT 2007


a.neundorf-work at gmx.net wrote:
> On Thursday 12 April 2007 19:33, Brandon J. Van Every wrote:
>   
>> Trevor Kellaway wrote:
>>     
>>> Hi,
>>>
>>> I'm try to get my link to depend on a pre-existing file that contains
>>> linker segment information "link.prm".
>>>
>>> I thought that by just adding this to the executable dependency list
>>> this should work:
>>>
>>>         ADD_EXECUTABLE (${THIS_APP} ${THIS_SRC}
>>> ${CMAKE_SOURCE_DIR}/link.prm)
>>>
>>> Alas, it seems to have no effect. The generated "build.make" contains
>>> no dependency references for "link.prm".
>>>
>>> Is this the correct way of doing this?
>>>       
>> ADD_EXECUTABLE isn't taking a dependency list.  It's taking a list of
>> source files used to build.  If link.prm has no relevance to the build,
>> I'll wager that it is discarded.  
>>     
>
> In recent cmake version (I think since 2.4.3) the correct way to specify the 
> dependency to generated source files is to add them to the list of sources.  
> So actually it should work.
>   

link.prm is not a source file.  I seriously doubt that dependency info 
is going to be generated for arbitrary files.


Cheers,
Brandon Van Every

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070412/333798cf/attachment.html


More information about the CMake mailing list