- added ability to check if compiler supports SSE and if not fallback to X87 for streflop.

- added ability for clients to specify gamma override value for drivers which support it
This commit is contained in:
Mark Vejvoda
2011-12-23 08:20:54 +00:00
parent f38c8c9f63
commit 2e94c32d59
14 changed files with 103 additions and 22 deletions

View File

@@ -3,13 +3,13 @@
include(CheckFunctionExists)
include(AddFileDependencies)
macro(special_add_library lib)
if (WIN32)
add_library(${lib} STATIC ${ARGN})
else (WIN32)
add_library(${lib} SHARED ${ARGN})
endif (WIN32)
endmacro(special_add_library)
#macro(special_add_library lib)
# if (WIN32)
# add_library(${lib} STATIC ${ARGN})
# else (WIN32)
# add_library(${lib} SHARED ${ARGN})
# endif (WIN32)
#endmacro(special_add_library)
macro(special_check_for_sse _max_sse_level_desired)
set(${_max_sse_level_desired})
@@ -78,6 +78,9 @@ macro(special_check_for_sse _max_sse_level_desired)
set(SSE_FLAGS "-msse -mfpmath=sse")
message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
endif()
add_definitions(${SSE_FLAGS})
elseif(MSVC)
check_cxx_source_runs("
#include <emmintrin.h>
@@ -96,6 +99,8 @@ macro(special_check_for_sse _max_sse_level_desired)
message(STATUS "Found SSE2 extensions")
set(SSE_FLAGS "/arch:SSE2 /fp:fast -D__SSE__ -D__SSE2__" )
endif()
add_definitions(${SSE_FLAGS})
endif()
endmacro(special_check_for_sse)