MantisBT - CMake
View Issue Details
0010209CMakeModulespublic2010-01-30 18:372010-08-30 13:27
Dmitry Marakasov 
Miguel Figueroa 
normalmajoralways
closedfixed 
CMake-2-8 
 
0010209: FindwxWidgets.cmake is broken
FindwxWidgets.cmake is completely broken in 2.8. When used in both ways, i.e. via INCLUDE(${wxWidgets_USE_FILE}) and with explicit INCLUDE_DIRECTORIES/ADD_DEFINITIONS it makes the build fail.

CMakeLists.txt to reproduce the problems, as well as build logs are attached.

Additional info:

% uname -a
FreeBSD hades.panopticon 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Tue Nov 24 22:31:59 MSK 2009 root@hades.panopticon:/async/obj/usr/src/sys/HADES i386
% wxgtk2-2.8-config --cflags
-I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -D_THREAD_SAFE
% wxgtk2-2.8-config --libs
-L/usr/local/lib -pthread -L/usr/local/lib -lwx_gtk2_richtext-2.8 -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8

wxgtk2-2.8.10
cmake-2.8.0
No tags attached.
txt log.txt (4,141) 2010-01-30 18:37
https://public.kitware.com/Bug/file/2825/log.txt
txt newlog.txt (3,786) 2010-05-05 08:56
https://public.kitware.com/Bug/file/3090/newlog.txt
patch findwxwidgets-bug-10209.patch (1,241) 2010-05-09 13:56
https://public.kitware.com/Bug/file/3096/findwxwidgets-bug-10209.patch
Issue History
2010-01-30 18:37Dmitry MarakasovNew Issue
2010-01-30 18:37Dmitry MarakasovFile Added: log.txt
2010-02-01 09:51Bill HoffmanStatusnew => assigned
2010-02-01 09:51Bill HoffmanAssigned To => Miguel Figueroa
2010-03-07 03:18Miguel FigueroaNote Added: 0019744
2010-05-05 08:56Dmitry MarakasovFile Added: newlog.txt
2010-05-05 08:57Dmitry MarakasovNote Added: 0020579
2010-05-05 08:57Dmitry MarakasovNote Edited: 0020579
2010-05-09 13:56Miguel FigueroaFile Added: findwxwidgets-bug-10209.patch
2010-05-09 13:58Miguel FigueroaNote Added: 0020687
2010-08-28 10:22Kovarththanan RajaratnamCategoryCMake => Modules
2010-08-29 12:03Miguel FigueroaNote Added: 0022000
2010-08-29 12:03Miguel FigueroaStatusassigned => resolved
2010-08-29 12:03Miguel FigueroaResolutionopen => fixed
2010-08-30 13:27Miguel FigueroaStatusresolved => closed

Notes
(0019744)
Miguel Figueroa   
2010-03-07 03:18   
The correct use is with the USEFILE. Otherwise, you should use COMPILE_DEFINITIONS property.

Could you remove the comments of the debug macro at the top of the FindwxWidgets.cmake file:

MACRO(DBG_MSG _MSG)
  MESSAGE(STATUS
    "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO(DBG_MSG)
MACRO(DBG_MSG_V _MSG)
  MESSAGE(STATUS
    "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO(DBG_MSG_V)

then provide the output after running your example:

cmake -DwxWidgets_CONFIG_EXECUTABLE="/usr/local/bin/wxgtk2-2.8-config" -DWX_USEFILE:BOOL=YES . && make -DVERBOSE

Thanks,
--Miguel
(0020579)
Dmitry Marakasov   
2010-05-05 08:57   
> The correct use is with the USEFILE. Otherwise, you should use COMPILE_DEFINITIONS property

Why can't it be done in a compatible way (in fact it was done so before the breakage)?

> then provide the output after running your example

Done, new log attached.

(0020687)
Miguel Figueroa   
2010-05-09 13:58   
Could you try the attached findwxwidgets-bug-10209.patch?

I think this should solve the problem. Note that you still need to use the wxWidgets_USE_FILE or the COMPILE_DEFINITIONS property.
(0022000)
Miguel Figueroa   
2010-08-29 12:03   
Fixed in the following commit:

commit c8c7b22323d8afe9d113a6e1783111057abbeedd
Merge: b817276 279b9f2
Author: Brad King <brad.king@kitware.com>
Date: Fri May 14 13:06:48 2010 -0400