View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011296 | CMake | Modules | public | 2010-10-07 03:47 | 2016-06-10 14:31 | ||||
Reporter | Florent Teichteil | ||||||||
Assigned To | Richard Shaw | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011296: FindwxWidget.cmake prevents from cross compiling for Windows under Linux | ||||||||
Description | Hi all, There is a bug in the cmake module FindwxWidgets.cmake that prevents any library using wxWidgets to cross compile for Windows from Linux. Please note that this bug is different from issue 0006187. Lines 192 to 198 are concerned by the present bug: IF(WIN32 AND NOT CYGWIN AND NOT MSYS) SET(wxWidgets_FIND_STYLE "win32") ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS) IF(UNIX OR MSYS) SET(wxWidgets_FIND_STYLE "unix") ENDIF(UNIX OR MSYS) ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS) The problem is that, when cross compiling from Linux for Windows, the test "WIN32 AND NOT CYGWIN AND NOT MSYS" is true but find style should be "unix", because the Windows-based wxWidget library is installed in a unix environment. Therefore, the following line replacement corrects this bug: IF(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING) SET(wxWidgets_FIND_STYLE "win32") ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING) IF(UNIX OR MSYS OR CMAKE_CROSSCOMPILING) SET(wxWidgets_FIND_STYLE "unix") ENDIF(UNIX OR MSYS OR CMAKE_CROSSCOMPILING) ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING) The modified FindwxWidget.cmake module runs fine with the following toolchain cmake file: SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_C_COMPILER /usr/bin/i686-pc-mingw32-gcc) SET(CMAKE_CXX_COMPILER /usr/bin/i686-pc-mingw32-g++) SET(CMAKE_FIND_ROOT_PATH /usr/i686-pc-mingw32) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) Could this "patch" be applied in cmake svn, please? All the best, Florent | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0032183) abma (reporter) 2013-01-30 19:44 |
i ran into the same bug. the suggested changes fixed it for me, too, please fix ASAP! |
(0033213) Richard Shaw (developer) 2013-06-03 11:40 |
Same fixed worked for me! |
(0034115) Richard Shaw (developer) 2013-10-13 15:40 |
This is an extremely simple patch and it is a pain to reapply every time a new cmake build gets installed on Fedora. Can someone please evaluate this and get it fixed? |
(0035534) Orion Poplawski (reporter) 2014-03-26 21:51 |
Miguel - are you still responsible for for FindwxWidgets.cmake? |
(0036655) Richard Shaw (developer) 2014-08-20 09:32 |
Ok, I don't know how to reassign the bug to me but I'm now the upstream mantainer for {FindwxWidgets,UsewxWidgets}.cmake. I plan on implementing this patch but I have some other observations: 1. Checking for platforms to determine which type of paths to use is inherently broken. Any new platform that's added will likely require that the conditionals be updated. It would be better to check by capability but I'm not sure how to do this. 2. In lieu of implementing a capability based solution, I would like to add an option so users can force it to be one or the other for corner cases. 3. Just noticed this... Do we really need the 2nd if(...) conditional? Although we may have all current cases covered from a practical point of view, from a technical point of view it's possible to fail both conditionals and not set the path type at all. |
(0036674) Richard Shaw (developer) 2014-08-25 09:04 |
Basic fix has been submitted for inclusion to the next release. http://cmake.org/gitweb?p=stage/cmake.git;a=patch;h=33286235048495ceafb636d549d9a4e8891967ae [^] |
(0041751) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-10-07 03:47 | Florent Teichteil | New Issue | |
2010-10-07 08:37 | Miguel Figueroa | Status | new => assigned |
2010-10-07 08:37 | Miguel Figueroa | Assigned To | => Miguel Figueroa |
2013-01-30 19:44 | abma | Note Added: 0032183 | |
2013-04-16 02:25 | Rolf Eike Beer | Relationship added | has duplicate 0014092 |
2013-06-03 11:40 | Richard Shaw | Note Added: 0033213 | |
2013-10-13 15:40 | Richard Shaw | Note Added: 0034115 | |
2014-03-26 21:51 | Orion Poplawski | Note Added: 0035534 | |
2014-08-20 09:32 | Richard Shaw | Note Added: 0036655 | |
2014-08-20 10:26 | Richard Shaw | Assigned To | Miguel Figueroa => Richard Shaw |
2014-08-20 10:26 | Richard Shaw | Status | assigned => acknowledged |
2014-08-25 09:04 | Richard Shaw | Note Added: 0036674 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0041751 | |
2016-06-10 14:28 | Kitware Robot | Status | acknowledged => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |