| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0011563 | CMake | Modules | public | 2010-12-02 14:52 | 2011-03-28 12:10 | ||||
| Reporter | Mikael Lund | ||||||||
| Assigned To | Mathieu Malaterre | ||||||||
| Priority | normal | Severity | trivial | Reproducibility | always | ||||
| Status | closed | Resolution | no change required | ||||||
| Platform | mac | OS | darwin | OS Version | 10.6 | ||||
| Product Version | CMake 2.8.3 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0011563: ability to parse *.h files as *.i interface files | ||||||||
| Description | Rather than writing separate SWIG interface files (*.i), swig commands are often included directly in C/C++ header files. I.e. /*---- test.h files -----*/ #ifdef SWIG %module faunus %{ #include "test.h" %} class someclass { ... }; /*----- end of header file -----*/ The cmake UseSWIG module, however, allows only passing of *.i files (other file extentions are filtered out and not passed on to swig). I suggest to allow for *.h files as well. This can be done with a simple patch - see below. This should be fine as one would (as far as I can tell) not add header files for other reasons than this. | ||||||||
| Additional Information | $ diff UseSWIG.cmake UseSWIG.cmake.bak 197c197 < IF(${it} MATCHES ".*\\.(i|h)$") --- > IF(${it} MATCHES ".*\\.i$") 199c199 < ELSE(${it} MATCHES ".*\\.(i|h)$") --- > ELSE(${it} MATCHES ".*\\.i$") 201c201 < ENDIF(${it} MATCHES ".*\\.(i|h)$") --- > ENDIF(${it} MATCHES ".*\\.i$") | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0023690) Mathieu Malaterre (developer) 2010-12-03 07:27 |
Hi, AFAIK your proposed patch will break backward compatibility. Why not directly use: SWIG_ADD_SOURCE_TO_MODULE(faunus output_generated_file_to_cleanup test.h) just after the SWIG_ADD_MODULE. Thx |
|
(0024222) Mikael Lund (reporter) 2010-12-16 17:44 |
Thanks. I've solved the issue by simply creating a single .i where I import all the .h files. Best, Mikael |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2010-12-02 14:52 | Mikael Lund | New Issue | |
| 2010-12-03 07:27 | Mathieu Malaterre | Note Added: 0023690 | |
| 2010-12-15 12:23 | David Cole | Assigned To | => Mathieu Malaterre |
| 2010-12-15 12:23 | David Cole | Status | new => assigned |
| 2010-12-16 17:44 | Mikael Lund | Note Added: 0024222 | |
| 2011-03-28 12:10 | Mathieu Malaterre | Status | assigned => closed |
| 2011-03-28 12:10 | Mathieu Malaterre | Resolution | open => no change required |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |