[CMake] CMAKE_SIZEOF_VOID_P did not set correctly by TDM-GCC -m32 argument

LightGoLeft drakedog2008 at outlook.com
Wed Dec 27 03:04:05 EST 2017


Hello, 

I am currently using TDM-GCC-64 (MinGW) and MSVC to build binaries on 64 bit
Windows to build both 32 and 64bit binaries. However, I found architecture
passed to GNUtoMS bat is determined by CMAKE_SIZEOF_VOID_P which is not
correctly set. 

For GCC, I set
  SET(CMAKE_CXX_FLAGS "-m32 ${CMAKE_CXX_FLAGS}")
  SET(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}")
But, message(${CMAKE_SIZEOF_VOID_P }) is always 8. That causes GNUtoMS
generating x64 *.lib from x86 *.a. I don't know whether this is a bug or by
design. 

Thanks, 
Hao. 




--
Sent from: http://cmake.3232098.n2.nabble.com/


More information about the CMake mailing list