MantisBT - CMake
View Issue Details
0015950CMakeCMakepublic2016-02-02 07:532016-06-10 14:31
Lars Wiese 
Kitware Robot 
normalminoralways
closedmoved 
x64Windows7
CMake 3.4.3 
 
0015950: CMAKE_SIZEOF_VOID_P is undefined on Windows 7 x64 VM (Vmware 10)
CMAKE_SIZEOF_VOID_P is undefined on Windows 7 x64 VM (Vmware 10)
I am using CMAKE_SIZEOF_VOID_P for switching parameters for x86 or x64.
For my understanding the value is related to generator the ARCH.

I tried the generator for VS 2010 and VS2013 together with/without "<ARCH> Win64"
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
  set (ARCH "x64")
  add_definitions("-DX86_64")
  message ("Build type: Windows x64")
else ()
  set (ARCH "x86")
  message ("Build type: Windows x86")
endif()
No tags attached.
Issue History
2016-02-02 07:53Lars WieseNew Issue
2016-02-02 08:29Brad KingNote Added: 0040427
2016-02-02 20:14Ruslan BaratovNote Added: 0040428
2016-06-10 14:29Kitware RobotNote Added: 0042931
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
(0040427)
Brad King   
2016-02-02 08:29   
This is supposed to be set here:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeCCompiler.cmake.in;hb=v3.4.3#l44 [^]

by the code

 if(CMAKE_C_SIZEOF_DATA_PTR)
   set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
 endif()

The CMAKE_<LANG>_SIZEOF_DATA_PTR values are detected by code here:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeCompilerABI.h;hb=v3.4.3 [^]
 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerABI.cmake;hb=v3.4.3#l36 [^]

That should give you a starting point to trace it locally.
(0040428)
Ruslan Baratov   
2016-02-02 20:14   
Also there are variables MSVC_CXX_ARCHITECTURE_ID/MSVC_C_ARCHITECTURE_ID with values X86, x64, ARMV7.
(0042931)
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.