[CMake] Detecting -m32 build target on 64-bit host
Mateusz Loskot
mateusz at loskot.net
Thu Apr 23 11:08:08 EDT 2015
On 23 April 2015 at 16:57, Nils Gladitz <nilsgladitz at gmail.com> wrote:
> On 04/23/2015 04:54 PM, Mateusz Loskot wrote:
>>
>> Hi,
>>
>> Surprisingly, I'm having trouble to figure out how to determine,
>> that in Linux 64-bit OS, I'm building a project with -m32 specified.
>> IOW, any CMake variable or macro to tell me target architecture
>> of a build that is being configured is 32 or 64 bit?
>
>
> CMAKE_SIZEOF_VOID_P [1] should be:
> - 4 for 32-bit builds
> - 8 for 64-bit builds
Nils,
I know this trick, but this is not what I'm looking for, unless I
misread the documentation.
The doc says:
"This is set to the size of a pointer on the machine"
but not size of pointer on *target* architecture of a build.
I believe I formulated my question clear.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the CMake
mailing list