MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0004147 | CMake | Modules | public | 2006-12-05 19:12 | 2016-06-10 14:30 | |||||
Reporter | Tristan Carel | |||||||||
Assigned To | jschueller | |||||||||
Priority | low | Severity | feature | Reproducibility | always | |||||
Status | closed | Resolution | moved | |||||||
Platform | OS | OS Version | ||||||||
Product Version | ||||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0004147: [MODULES][UseSWIG] Use swig to compute dependencies | |||||||||
Description | Swig is able to generate a file (in make language) which contains the exact dependencies of the generated wrapper. The following patch add the macro `SWIG_GET_WRAPPER_DEPENDENCIES' to the `UseSWIG' module: # SWIG_GET_WRAPPER_DEPENDENCIES(swigFile genWrapper language DEST_VARIABLE) # - Put dependencies of the wrapper genWrapper generated by swig from # swigFile in DEST_VARIABLE The macro uses a `EXECUTE_PROCESS' which calls swig with the option described above. The way to compute the command line used in the EXECUTE_PROCESS is performed like `SWIG_ADD_MODULE' does: - use GET_DIRECTORY_PROPERTY to retrieve the INCLUDE_DIRECTORIES - use GET_SOURCE_FILE_PROPERTY to get extra flags attached to the swig input file. The dirty part of the macro is the content's extraction of the generated file which is written in `make language' target: \ dependence1 \ dependence2 \ ... dependenceN I has been tested with swig 1.3.{29,30,31} under Windows / Debian Linux in 2 use cases: /*--------------------------------------------------. | with code which use the `SWIG_ADD_MODULE' command | `--------------------------------------------------*/ # ... SWIG_ADD_MODULE(Test python module.i foo.cpp foo.h) # ... /*----------------------------. | with targets made manually: | `----------------------------*/ # ... SWIG_GET_WRAPPER_DEPENDENCIES(module.i module_wrap.cpp python module_deps) ADD_CUSTOM_COMMAND(OUTPUT module_wrap.cpp COMMAND ${SWIG_EXECUTABLE} ARGS [...] -o module_wrap.cpp module.i MAIN_DEPENDENCY module.i DEPENDS ${module_deps} SET_SOURCE_FILE_PROPERTIES(module_wrap.cpp PROPERTIES GENERATED TRUE) # ... thx -- Tristan | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | UseSWIG.cmake.patch (3,771) 1969-12-31 19:00 https://public.kitware.com/Bug/file/764/UseSWIG.cmake.patch UseSWIG.cmake.diff.RC2 (3,714) 1969-12-31 19:00 https://public.kitware.com/Bug/file/768/UseSWIG.cmake.diff.RC2 UseSWIG.cmake.diff.RC3 (3,750) 1969-12-31 19:00 https://public.kitware.com/Bug/file/774/UseSWIG.cmake.diff.RC3 UseSWIG.cmake.diff.RC4 (3,770) 1969-12-31 19:00 https://public.kitware.com/Bug/file/775/UseSWIG.cmake.diff.RC4 | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2008-10-09 13:09 | Bill Hoffman | Note Added: 0013798 | ||||||||
2009-10-30 11:55 | Mathieu Malaterre | Assigned To | Bill Hoffman => Mathieu Malaterre | |||||||
2011-03-28 12:20 | Mathieu Malaterre | Note Added: 0025934 | ||||||||
2011-03-28 12:20 | Mathieu Malaterre | Status | assigned => closed | |||||||
2011-03-28 12:20 | Mathieu Malaterre | Resolution | open => fixed | |||||||
2011-06-26 08:38 | David Cole | Relationship added | related to 0012307 | |||||||
2011-06-26 08:39 | David Cole | Note Added: 0026976 | ||||||||
2011-06-27 13:06 | Brad King | Note Added: 0026991 | ||||||||
2011-06-27 13:06 | Brad King | Status | closed => feedback | |||||||
2011-06-27 13:06 | Brad King | Resolution | fixed => reopened | |||||||
2011-06-27 13:40 | Brad King | Note Added: 0026994 | ||||||||
2015-06-26 11:00 | FlorianM | Note Added: 0038989 | ||||||||
2015-06-26 11:01 | FlorianM | Note Edited: 0038989 | bug_revision_view_page.php?bugnote_id=38989#r1810 | |||||||
2015-06-26 11:06 | Brad King | Assigned To | Mathieu Malaterre => jschueller | |||||||
2015-06-26 11:06 | Brad King | Status | feedback => assigned | |||||||
2015-06-26 11:06 | Brad King | Resolution | reopened => open | |||||||
2015-06-26 11:10 | Brad King | Note Added: 0038991 | ||||||||
2015-07-01 11:48 | Cameron Christensen | Note Added: 0039007 | ||||||||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041335 | ||||||||
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | |||||||
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | |||||||
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|