View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014520CMakeCMakepublic2013-10-29 04:082014-06-02 08:37
ReporterAdrien Bruneton 
Assigned Tojschueller 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product VersionCMake 2.8.12 
Target VersionFixed in VersionCMake 3.0 
Summary0014520: UseSWIG module can generate too long command lines in the build chain
DescriptionThe macro SWIG_ADD_SOURCE_TO_MODULE in the standard module UseSWIG can potentially generate too long command lines in the build chain, making the build fail. This macro is called by SWIG_ADD_MODULE (main entry point).
The problem typically appears first under Windows (which has tighter restrictions in terms of maximal command line length).

In complex projects it is often the case that identical include directories are repeated several times. The CMake command INCLUDE_DIRECTORIES deals with this situation nicely and only keeps one instance of each directory, and hence one iteration of the "-I/a/b/c" directive. This is not the case when invoking SWIG_ADD_MODULE: the "-I/a/b/c" directive is repeated as many times as the (same) directory was included.
Steps To ReproduceCall SWIG_ADD_MODULE macro in a subdirectory performing (many) redundant includes.
Additional InformationBelow a proposed patch to the file UseSWIG.cmake helping mitigating the issue.
TagsNo tags attached.
Attached Filespatch file icon patch-UseSWIG.patch [^] (62 bytes) 2013-10-29 04:08 [Show Content]

 Relationships

  Notes
(0034550)
jschueller (developer)
2013-11-25 09:18

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=20028d600f643f06a2f4d8a429a02ce770e0c8a4 [^]
(0036031)
Robert Maynard (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-10-29 04:08 Adrien Bruneton New Issue
2013-10-29 04:08 Adrien Bruneton File Added: patch-UseSWIG.patch
2013-10-29 04:46 Rolf Eike Beer Assigned To => Mathieu Malaterre
2013-10-29 04:46 Rolf Eike Beer Status new => assigned
2013-11-25 08:25 Brad King Assigned To Mathieu Malaterre => jschueller
2013-11-25 09:18 jschueller Note Added: 0034550
2013-11-25 09:18 jschueller Status assigned => resolved
2013-11-25 09:18 jschueller Fixed in Version => CMake 3.0
2013-11-25 09:18 jschueller Resolution open => fixed
2014-06-02 08:37 Robert Maynard Note Added: 0036031
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team