[cmake-developers] [CMake 0015508]: UseSWIG->SWIG_ADD_MODULE doesn't correctly grab module name from source file

Mantis Bug Tracker mantis at public.kitware.com
Thu Apr 9 23:49:31 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15508 
====================================================================== 
Reported By:                RPM
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15508
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2015-04-09 23:49 EDT
Last Modified:              2015-04-09 23:49 EDT
====================================================================== 
Summary:                    UseSWIG->SWIG_ADD_MODULE doesn't correctly grab
module name from source file
Description: 
If the SWIG_MODULE_NAME is not set on the source file, the macro is supposed to
try and determine the module name by performing a REGEX on the source file. 
This doesn't appear to work correctly.

The issue is that SWIG_GET_EXTRA_OUTPUT_FILES checks to see if the source file
EXISTS, but does so with infile, which is an undefined operation if it is a
relative path.  The SWIG_ADD_SOURCE_TO_MODULE grabs the absolute path in
swig_source_file_fullname, but then does not pass it on to
SWIG_GET_EXTRA_OUTPUT_FILES.  Making it pass the absolute path allows it to
correctly find the file whether provided as relative or absolute.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-04-09 23:49 RPM            New Issue                                    
======================================================================



More information about the cmake-developers mailing list