[CMake] Testing for SSE and adding appropriate Compile options
Michael Jackson
mike.jackson at bluequartz.net
Fri Sep 25 17:17:24 EDT 2009
I tried that also and it didn't work either. I am not at my windows
box at the moment to get the exact error. I now have
if (AIMBLADE_USE_SSE)
set_source_files_properties(${SymmetryFilter_SOURCE_DIR}/
FFThread.cpp
${SymmetryFilter_SOURCE_DIR}/
FFNormalizeThread.h
${AIMBlades_SOURCE_DIR}/Source/AIM/Common/
AIMArray_SSE.hpp
${SymmetryFilter_SOURCE_DIR}/
LengthScaleData.cpp
PROPERTIES COMPILE_FLAGS $
{SSE_COMPILE_FLAGS} )
endif()
although I was trying all that on a non-clean build folder (.. I
know.. ) so there may have been some slop still left over from other
configuration runs..
Is there a CMake Standard for looking for SSE and what to do? I
tried looking through the ITK sources for "inspiration" but ITK is
pretty complex to try and grep through the sources.
_________________________________________________________
Mike Jackson mike.jackson at bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
On Sep 25, 2009, at 5:01 PM, Bill Hoffman wrote:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list