CMake: Test that the compiler has SSE2 support.
This commit is contained in:
parent
166ac72b96
commit
cdf3e21025
|
|
@ -159,6 +159,10 @@ check_include_file_cxx(typeinfo HAVE_RTTI)
|
|||
# Do we have Posix threads?
|
||||
#set(HAVE_POSIX_THREADS ${CMAKE_USE_PTHREADS_INIT})
|
||||
|
||||
# Do we have SSE2 support?
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag(-msse2 HAVE_SSE2)
|
||||
|
||||
#/* Define if needed to have 64-bit file i/o */
|
||||
#$[cdefine __USE_LARGEFILE64]
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ set(P3PNMIMAGE_IGATEEXT
|
|||
pfmFile_ext.h
|
||||
)
|
||||
|
||||
set_source_files_properties(convert_srgb_sse2.cxx PROPERTIES COMPILE_FLAGS -msse2)
|
||||
if(HAVE_SSE2)
|
||||
set_source_files_properties(convert_srgb_sse2.cxx PROPERTIES COMPILE_FLAGS -msse2)
|
||||
endif()
|
||||
|
||||
composite_sources(p3pnmimage P3PNMIMAGE_SOURCES)
|
||||
add_library(p3pnmimage ${P3PNMIMAGE_HEADERS} ${P3PNMIMAGE_SOURCES} convert_srgb_sse2.cxx)
|
||||
|
|
|
|||
Loading…
Reference in New Issue