MantisBT - CMake
View Issue Details
0014642CMakeModulespublic2013-12-10 10:362016-06-10 14:31
philrosenberg 
Kitware Robot 
normalmajoralways
closedmoved 
x64Windows8
CMake 2.8.12 
 
0014642: CMAKE does not find the 64 bit versions of wxWidgets on Windows
FindwxWidgets.cmake always returns the 32 bit version of the wxWidget libraries, even for a 64 bit build specified by using -G "Visual Studio 11 Win64". If the 32 bit versions of the libraries do not exist then no libraries are found.

I've attached a patch for the FindwxWidgets.cmake file which fixes the problem by checking for "Win64" at the end of the generator. The patch doesn't make any attempts to check in the case of gcc - I don't use it so don't know how 64 bit is specified for this compiler.
use FindwxWidgets.cmake with -G "Visual Studio 11 Win64" or any other Win64 version of Visual Studio
No tags attached.
related to 0014393closed Brad King FindwxWidgets.cmake doesn't look for x64 wxWidgets (MSVC) directories. 
related to 0014693closed  CMake fails when x64 tools are used 
has duplicate 0014783closed  nightly build problem with findwxWidgets 
related to 0015309closed Kitware Robot 64 bit build of wxWidgets-2.8.12 is not found 
patch FindwxWidgets.cmake.patch (445) 2013-12-10 10:36
https://public.kitware.com/Bug/file/5013/FindwxWidgets.cmake.patch
patch FindwxWidgets.cmake2.patch (842) 2013-12-14 05:10
https://public.kitware.com/Bug/file/5016/FindwxWidgets.cmake2.patch
Issue History
2013-12-10 10:36philrosenbergNew Issue
2013-12-10 10:36philrosenbergFile Added: FindwxWidgets.cmake.patch
2013-12-10 16:22Rolf Eike BeerNote Added: 0034769
2013-12-14 05:10philrosenbergFile Added: FindwxWidgets.cmake2.patch
2013-12-14 05:18philrosenbergNote Added: 0034774
2014-01-11 07:28philrosenbergNote Added: 0034925
2014-01-11 08:33Rolf Eike BeerNote Added: 0034926
2014-01-11 08:33Rolf Eike BeerCategoryCMake => Modules
2014-03-03 08:53Brad KingRelationship addedrelated to 0014783
2014-03-03 08:55Brad KingRelationship addedrelated to 0014393
2014-03-03 08:56Brad KingRelationship replacedhas duplicate 0014783
2014-03-03 08:57Brad KingRelationship addedrelated to 0014693
2014-03-03 08:59Brad KingNote Added: 0035230
2014-03-03 18:35philrosenbergNote Added: 0035244
2014-03-04 15:38Brad KingNote Added: 0035248
2014-12-15 09:18Brad KingRelationship addedrelated to 0015309
2016-06-10 14:29Kitware RobotNote Added: 0042445
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034769)
Rolf Eike Beer   
2013-12-10 16:22   
-please send a patch using diff -u, or preferably a git patch
-does it still work for you if you check CMAKE_CL_64 or CMAKE_SIZEOF_VOID_P EQUAL 8?
(0034774)
philrosenberg   
2013-12-14 05:18   
I've uploaded a diff -u patch. Sorry I don't have time to work out how to use git right now.

I tried CMAKE_SIZEOF_VOID_P first, but it always evaluated to 4 regardless of the generator. I just checked CMAKE_CL_64 and when using the Visual Studio 11 Win64 generator it is empty.

Note that I am running CMake from the VC++ 2012 x86 Tools command Prompt even for x64 builds. This is because when I use the x64 command line for 64 bit projects, all tests for headers and functions fail, messing up my config.h and CMake adds /machine:x86 to the linker additional command line options for my exes (but not my libraries) which causes obvious linker errors (it took me most of a day's work to realise this was the issue and how to work around it). Presumably this is another CMake bug?
(0034925)
philrosenberg   
2014-01-11 07:28   
Hi Rolf, there doesn't seem to have been any change here for a while. Was the patch I sent not usable?
(0034926)
Rolf Eike Beer   
2014-01-11 08:33   
Sorry, I have no knowledge about the wxWidgets module, it was just some general remarks. Can it be that you have sent a reverse patch anyway?

FindwxWidgets seems to be orphaned, please see instructions here: http://www.cmake.org/Wiki/CMake:Module_Maintainers [^] . If there is no maintainer this patch will probably not be applied, at least I will not do it (as I said, I have no knowledge about that module, and do not have a Windows platform to test either).
(0035230)
Brad King   
2014-03-03 08:59   
Based on 0014642:0034774 and 0014693 I suspect there is something about the way you're running CMake or your system configuration that causes CMake to be confused about the difference between 32-bit and 64-bit target architectures.
(0035244)
philrosenberg   
2014-03-03 18:35   
Hi Brad
I've just been testing some things out. I am building the plplot library which uses wxWidgets. I'm running 64 bit windows 8, but want to be able to compile 32 and 64 bit versions.
Here is my command to generate a 64 bit version cmake ".." -G "Visual Studio 11 Win64" -DPL_DOUBLE=ON -DBUILD_TEST=ON -DCMAKE_LIBRARY_PATH="D:\usr\local\lib64snmaketest" -DBUILD_SHARED_LIBS=OFF -DCMAKE_CONFIGURATION_TYPES="Release" -DSTATIC_RUNTIME=ON -DwxWidgets_CON
FIGURATION=mswu -DENABLE_d=OFF

I've also been checking what happens with the NMake makefile generator run from the VS x64 command prompt. At the point which the findwxWidgets module sets the prefix the generator is correct, so ${CMAKE_GENERATOR} MATCHES "Win64$" returns true if the VS11 Win64 generator is used. However at this point CMAKE_C_COMPILER returns the path of the x86 compiler, MSVC_C_ARCHITECTURE_ID and MSVC_CXX_ARCHITECTURE_ID are both x86 and CMAKE_CL_64 is 0. This is quite odd because earlier in the process I see messages saying -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe -- works, which is the path to the 64 bit compiler.

To be honest I'm now stumped
(0035248)
Brad King   
2014-03-04 15:38   
Re 0014642:0035244: Let's please move discussion over to 0014693 which is about the toolchain support rather than wxWidgets. See 0014693:0035231.
(0042445)
Kitware Robot   
2016-06-10 14:29   
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.