Notes |
|
(0002273)
|
Bill Hoffman
|
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
|
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
|
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
|
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
|
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
|
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.
|
|