[CMake] Testing for SSE and adding appropriate Compile options

Bill Hoffman bill.hoffman at kitware.com
Fri Sep 25 17:01:18 EDT 2009


Michael Jackson wrote:

>> Does it work if you just drop the quotes from the second half of the
>> set()?
>>
>>> set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} /arch:SSE2)
>>
>> or, slightly more pedantically:
>>
>>> set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "/arch:SSE2")
>>

Nope, this variable is a string and not a list.
It has to be like this:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")


-Bill


More information about the CMake mailing list