• Create Account

### #ActualAlundra

Posted 21 April 2013 - 03:14 PM

Hi,

I'm using cmake to generate my project and I have recently learned the existence of "CMAKE_SIZEOF_VOID_P".

Is "CMAKE_SIZEOF_VOID_P" a portable solution ?

To generate project name for x86 and x64 I need to use this trick :

project(Test)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
project(Test_x64)
else()
project(Test_x86)
endif()


Is the only way to handle that correctly ?

Thanks

### #2Alundra

Posted 21 April 2013 - 03:14 PM

Hi,

I'm using cmake to generate my project and I have recently learned the existence of "CMAKE_SIZEOF_VOID_P".

Is "CMAKE_SIZEOF_VOID_P" a portable solution ?

To generate project name for x86 and x64 I need to use this trick :

project(Test)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
project(Test_x64)
else()
project(Test_x86)
endif()


Is the only way to handle that correctly ?

Thanks

### #1Alundra

Posted 21 April 2013 - 03:13 PM

Hi,

I'm using cmake to generate my project and recently I have learn the existence of "CMAKE_SIZEOF_VOID_P".

Is "CMAKE_SIZEOF_VOID_P" a portable solution ?

To generate project name for x86 and x64 I need to use this trick :

project(Test)
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
project(Test_x64)
else()
project(Test_x86)
endif()


Is the only way to handle that correctly ?

Thanks

PARTNERS