[CMake] swig

William S Fulton wsf at fultondesigns.co.uk
Fri Aug 19 15:46:15 EDT 2005


Brad King wrote:
> Peter Brown wrote:
>> I'm using cmake to build a ruby module for swig. My problem is, when I
>> change something in a header file, the wrap file is not automatically
>> re-generated. So I have to run "touch module_name.i" or save the .i -
>> file again before typing make. Can I avoid this somehow?
> 
> You can manually add the set of included header files to the DEPENDS 
> argument of the custom command in addition to the .i file that should 
> already be listed.  Unforutnately there is no official way to have 
> custom dependency scanning in custom commands right now.  See this reply 
> I just sent to a similar question:
> 
> http://www.cmake.org/pipermail/cmake/2005-August/007102.html
> 

You should be able to construct the dependencies for your 'manually add' 
by using the -M family of commandline options to swig. They are modelled 
on the gcc ones for generating header file dependencies.

William



More information about the CMake mailing list