[CMake] How to activate SSE2 only for Win32 architecture build

Kevin MOLCARD kevin.molcard at arturia.com
Fri Mar 6 07:28:24 EST 2015


Thanks, this worked like a charm.

On 3/6/15 12:55 PM, Jakub Zakrzewski wrote:
>> I would like to activate sse2 on my Windows build but only for 32 bit.
>> I am using the foolowing code:
>> SET(CMAKE_CXX_FLAGS "/arch:SSE2")
>> Does anyone know how to activate this flag only for Win32 build?
> Maybe like that:
>
> if(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32-bit
> 	SET(CMAKE_CXX_FLAGS "/arch:SSE2")
> endif()

-- 
Kevin Molcard Senior Software Engineer
t.+33 438 020 555 — f.+33 438 020 525

<http://www.arturia.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150306/d0dbee88/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Logo-Baseline-0.15x.png
Type: image/png
Size: 9430 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150306/d0dbee88/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature_img.png
Type: image/png
Size: 42873 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150306/d0dbee88/attachment-0003.png>


More information about the CMake mailing list