View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001731 | CMake | public | 2005-04-02 03:12 | 2005-08-24 19:14 | |||||
Reporter | Axel Wachtler | ||||||||
Assigned To | System Admin | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | duplicate | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001731: UseSWIG - dependency hook for code generators | ||||||||
Description | Sometimes it is useful to call another code generator, before swig is called. In order to realize that, I suggest to add the following in the custom command ADD_CUSTOM_COMMAND( OUTPUT "${swig_generated_file_fullname}" ... DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS} With SWIG_MODULE_${name}_EXTRA_DEPS, files which are output of a custom command and which are included from the swig interface file can be hooked in. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0002273) Bill Hoffman (manager) 2005-04-05 10:20 |
Copy duplicate bug over: When one uses SWIG to create a library, CMake is able to maintain the dependency on the interface file itself but it doesn't maintain the dependencies on the files included in the interface file (i.e. files included with %include or %import). SWIG provides an option to generate a list of dependencies (-MM I believe) in Make format: target: dep1 dep2 dep3 .... Is there anyway to use this file as an input for CMake to maintain all the dependencies? |
(0002275) Anton Deguet (reporter) 2005-04-05 11:12 |
I believe these are two different issues. The initial request is to add a manual step to create the SWIG interface file. The second issue (feature request/bug I posted) is, given an existing SWIG interface file, find the files included and maintain the dependencies. |
(0002320) Axel Wachtler (reporter) 2005-04-07 15:49 |
I think, swig -MM would solve it. I intended to generate a file, which is used with %include "my_file.h" - my_file.h is the output of code generator. The variable for the dependency hook is only a quick hack, -MM would be the more general solution. How does cmake resolve the dependencies for C/C++ files? gcc has the same -MM - mechanism, or does CMake parse the C-Sources by itself ? I don't know, if all other compiler/preprocesors have such a capability. |
(0002597) James Bigler (developer) 2005-07-06 15:17 |
I run into this quite a bit. I need sourcePYTHON_wrap.cxx to be regenerated when included files in source.i change (cmake 2.0.6 currently doesn\'t do this). What is the status? Is there something I could do to help out? Thanks, James |
(0002602) Brad King (manager) 2005-07-07 10:52 |
What is really needed is a custom dependency scanner for custom commands. Currently ITK (www.itk.org) uses an approximate solution in which the custom command itself dumps out a second file that is later loaded by CMake to add the dependencies. The first time the rule runs because the output is not present. After that the dependencies are available. See the GCCXML_CREATE_XML_FILE macro here: http://www.itk.org/cgi-bin/viewcvs.cgi/Wrapping/CSwig/CMakeLists.txt?rev=HEAD&root=Insight&view=auto [^] In CMake 2.2 you will be able to have multiple COMMANDs specified in a single ADD_CUSTOM_COMMAND so you can write a helper program that calls swig to get the dependencies and translates the results into CMake syntax. This is an ugly solution but it may help you get by until a real solution is implemented in CMake. |
(0002957) Brad King (manager) 2005-08-24 19:14 |
Bug 0002172 is a feature request that is more general than this. If implemented it will solve this problem too. As mentioned here and in bug 0001740 SWIG's -MM option could be used for custom dependency scanning. I'm closing this bug as a duplicate of the more general bug 0002172. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |