View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014459CMakeCMakepublic2013-10-04 06:332014-06-02 08:37
ReporterJoakim Söderberg 
Assigned Tojschueller 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product VersionCMake 2.8.9 
Target VersionFixed in VersionCMake 3.0 
Summary0014459: SWIG_ADD_MODULE does not create sub directory
DescriptionWhen using SWIG_ADD_MODULE to create wrappers, passing the input file from a sub directory there will be an error when trying to build since swig tries to write it's output to a directory that does not exist.

Steps To ReproduceThe example works fine:
SWIG_ADD_MODULE(example python example.i example.cxx)

This does not work (the input is in a subdirectory):
SWIG_ADD_MODULE(example python subdir/example.i subdir/example.cxx)

This will result in the following error (since SWIG tries to write it's ouput file to a non-existing directory under the build dir)

Unable to open file ****/build/subdir/examplePYTHON_wrap.c: No such file or directory

This can be fixed by manually creating the directory:
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/subdir)

This is not obvious or mentioned in the documentation. SWIG_ADD_MODULE should create the directory it's trying to output to.
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0013173closedjschueller Swig module can't handle absolute path 
related to 0013772closedjschueller UseSWIG.cmake does not handle relative paths with parent directories 

  Notes
(0036028)
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-04 06:33 Joakim Söderberg New Issue
2013-11-25 08:28 Brad King Assigned To => jschueller
2013-11-25 08:28 Brad King Status new => assigned
2013-11-25 08:28 Brad King Relationship added related to 0013173
2013-11-25 08:29 Brad King Relationship added related to 0013772
2013-11-25 09:11 jschueller Relationship replaced duplicate of 0013173
2013-11-25 09:11 jschueller Status assigned => resolved
2013-11-25 09:11 jschueller Fixed in Version => CMake 3.0
2013-11-25 09:11 jschueller Resolution open => duplicate
2014-06-02 08:37 Robert Maynard Note Added: 0036028
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team