MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0010080 | CMake | Modules | public | 2009-12-25 07:12 | 2015-03-02 08:57 |
|
Reporter | celil | |
Assigned To | jschueller | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake 3.0 | |
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | |
|
Summary | 0010080: UseSWIG rebuilds source even when the the dependencies have not changed |
Description | Using swig to build a python extension, I have a CMakeLists.txt that looks like this
swig_add_module(mod PYTHON mod.i )
swig_link_libraries(mod ${PYTHON_LIBRARIES} ext_lib)
However, with these commands running make rebuilds the _modPYTHON_wrap.cxx and _mod.so every time regardless of whether mod.i has changed or not. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0014859 | closed | jschueller | UseSWIG rebuilds source even when the the dependencies have not changed (again) |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2009-12-25 07:12 | celil | New Issue | |
2010-12-14 17:08 | David Cole | Assigned To | => Mathieu Malaterre |
2010-12-14 17:08 | David Cole | Status | new => assigned |
2010-12-14 17:09 | David Cole | Note Added: 0023985 | |
2011-03-28 12:21 | Mathieu Malaterre | Note Added: 0025935 | |
2011-03-28 12:22 | Mathieu Malaterre | Status | assigned => feedback |
2012-09-03 22:22 | Alex Turbov | Note Added: 0030905 | |
2012-09-03 22:22 | Alex Turbov | Note Edited: 0030905 | bug_revision_view_page.php?bugnote_id=30905#r801 |
2012-09-04 07:12 | Mathieu Malaterre | Note Added: 0030907 | |
2012-09-10 16:39 | Felix Schwitzer | Note Added: 0030989 | |
2014-02-24 10:01 | Brad King | Assigned To | Mathieu Malaterre => jschueller |
2014-02-24 10:01 | Brad King | Status | feedback => assigned |
2014-02-24 10:33 | Brad King | Note Added: 0035174 | |
2014-02-26 09:33 | Brad King | Status | assigned => resolved |
2014-02-26 09:33 | Brad King | Resolution | open => fixed |
2014-02-26 09:33 | Brad King | Fixed in Version | => CMake 3.1 |
2014-02-26 09:33 | Brad King | Target Version | => CMake 3.1 |
2014-03-20 05:12 | jschueller | Note Added: 0035446 | |
2014-03-20 05:12 | jschueller | Status | resolved => feedback |
2014-03-20 05:12 | jschueller | Resolution | fixed => reopened |
2014-03-20 05:14 | jschueller | Note Edited: 0035446 | bug_revision_view_page.php?bugnote_id=35446#r1403 |
2014-03-20 08:58 | Brad King | Note Added: 0035450 | |
2014-03-20 08:58 | Brad King | Status | feedback => assigned |
2014-03-20 08:58 | Brad King | Resolution | reopened => open |
2014-03-20 08:58 | Brad King | Product Version | CMake-2-8 => CMake 3.0 |
2014-03-20 08:58 | Brad King | Fixed in Version | CMake 3.1 => |
2014-04-01 06:15 | jschueller | Note Added: 0035595 | |
2014-04-01 06:16 | jschueller | Status | assigned => closed |
2014-04-01 06:16 | jschueller | Resolution | open => fixed |
2014-04-01 09:39 | jschueller | Status | closed => resolved |
2014-04-01 09:39 | jschueller | Fixed in Version | => CMake 3.1 |
2014-04-02 09:03 | Brad King | Relationship added | related to 0014859 |
2014-04-15 09:36 | Brad King | Note Added: 0035708 | |
2014-04-15 09:36 | Brad King | Status | resolved => assigned |
2014-04-15 09:36 | Brad King | Resolution | fixed => open |
2014-04-15 09:36 | Brad King | Fixed in Version | CMake 3.1 => |
2014-04-18 08:47 | jschueller | Note Added: 0035738 | |
2014-04-18 08:56 | Brad King | Note Added: 0035739 | |
2014-04-18 09:18 | jschueller | Note Added: 0035742 | |
2014-04-18 09:32 | Brad King | Note Added: 0035743 | |
2014-04-18 10:58 | jschueller | Note Added: 0035744 | |
2014-04-18 10:59 | jschueller | Note Edited: 0035744 | bug_revision_view_page.php?bugnote_id=35744#r1449 |
2014-04-21 09:25 | Brad King | Note Added: 0035749 | |
2014-04-21 09:25 | Brad King | Status | assigned => resolved |
2014-04-21 09:25 | Brad King | Resolution | open => fixed |
2014-04-21 09:25 | Brad King | Fixed in Version | => CMake 3.1 |
2015-03-02 08:57 | Robert Maynard | Note Added: 0038120 | |
2015-03-02 08:57 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0023985)
|
David Cole
|
2010-12-14 17:09
|
|
Hey Mathieu, you want this SWIG related issue, too? :-)
(If not, just assign it back to me...) |
|
|
(0025935)
|
Mathieu Malaterre
|
2011-03-28 12:21
|
|
I need more info to reproduce here. This is working ok for me.
thanks. |
|
|
(0030905)
|
Alex Turbov
|
2012-09-03 22:22
|
|
Mathieu what kind of info do you need?
I also have this bug in my current project and it's *really* annoyed...
Feel free to ask me any addition info...
|
|
|
(0030907)
|
Mathieu Malaterre
|
2012-09-04 07:12
|
|
As said before, this is working for me on GDCM project for years. I need your specific test case to reproduce and/or understand what /could/ be going on wrong. |
|
|
(0030989)
|
Felix Schwitzer
|
2012-09-10 16:39
|
|
I observed this behavior also, but
as far as I know this (rebuilding the whole wrapper file and the module)
happens only if the name of the python module and the name
of the interface file are different:
swig_add_module(mod PYTHON mod.i )
works fine, but
swig_add_module(ttt PYTHON mod.i)
will not.
My actual workaround is to name the module after the interface file. |
|
|
(0035174)
|
Brad King
|
2014-02-24 10:33
|
|
|
|
(0035446)
|
jschueller
|
2014-03-20 05:12
(edited on: 2014-03-20 05:14) |
|
The change I did is not good, I reverted it in the fix-0010080 branch.
I'll try a better fix by detecting the module name in the .i file.
|
|
|
(0035450)
|
Brad King
|
2014-03-20 08:58
|
|
|
|
(0035595)
|
jschueller
|
2014-04-01 06:15
|
|
|
|
(0035708)
|
Brad King
|
2014-04-15 09:36
|
|
Re 0010080:0035595: Might the .i file be generated and therefore not exist or be out of date when CMake is running? The file(STRINGS) command will fail if the file does not exist.
|
|
|
(0035738)
|
jschueller
|
2014-04-18 08:47
|
|
|
|
(0035739)
|
Brad King
|
2014-04-18 08:56
|
|
Re 0010080:0035738: This approach still feels unreliable. Now if the .i is generated this issue will still occur, right?
Why shouldn't the caller have to specify the module name to resolve this? |
|
|
(0035742)
|
jschueller
|
2014-04-18 09:18
|
|
I agree, and that's what I documented in the header:
"The property SWIG_MODULE_NAME can be used to specify the actual import name of the module in the target language if it cannot be parsed or different from the module file basename."
I thought guessing it automatically is a nice feature and will work for most cases. |
|
|
(0035743)
|
Brad King
|
2014-04-18 09:32
|
|
Re 0010080:0035742: Please extend the documentation to explain the situation fully (auto-scan when the source exists, required property setting otherwise). Also revise the wording to make it clear that SWIG_MODULE_NAME is a source file property on the .i file. It could even be an example:
set_property(SOURCE mymod.i PROPERTY SWIG_MODULE_NAME mymod_realname)
Also clarify that it must be set before the invocation of the macro. |
|
|
(0035744)
|
jschueller
|
2014-04-18 10:58
(edited on: 2014-04-18 10:59) |
|
|
|
(0035749)
|
Brad King
|
2014-04-21 09:25
|
|
|
|
(0038120)
|
Robert Maynard
|
2015-03-02 08:57
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|