[cmake-developers] [CMake 0011563]: ability to parse *.h files as *.i interface files
Mantis Bug Tracker
mantis at public.kitware.com
Thu Dec 2 14:52:54 EST 2010
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=11563
======================================================================
Reported By: Mikael Lund
Assigned To:
======================================================================
Project: CMake
Issue ID: 11563
Category: Modules
Reproducibility: always
Severity: trivial
Priority: normal
Status: new
======================================================================
Date Submitted: 2010-12-02 14:52 EST
Last Modified: 2010-12-02 14:52 EST
======================================================================
Summary: 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$")
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-12-02 14:52 Mikael Lund New Issue
======================================================================
More information about the cmake-developers
mailing list