[cmake-developers] CMAKE architecture generator expression

Craig Scott craig.scott at crascit.com
Mon Nov 6 03:17:00 EST 2017


On Mon, Nov 6, 2017 at 4:12 AM, llvm 999 <llvm.999 at outlook.com> wrote:

>
>
> Can anyone tell me the most appropriate generator expression to obtain the
> x32 vs x64 build info regardless of platform (windows or Linux)?
>
>
>
> I would like to place some static libs into certain output folders based
> on whether I am building for a x32 or x64 architecture.
>

Assuming you just want to differentiate between 32- and 64-bit builds,
something like the following should point you in the right direction:

$<$<EQUAL:4,${CMAKE_SIZEOF_VOID_P}>:...>    # 32-bit build
$<$<EQUAL:8,${CMAKE_SIZEOF_VOID_P}>:...>    # 64-bit build


-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20171106/a365b585/attachment.html>


More information about the cmake-developers mailing list