|
|
|
@ -529,14 +529,22 @@ macro(ocv_glob_module_sources) |
|
|
|
|
if(ENABLE_AVX) |
|
|
|
|
file(GLOB avx_srcs "src/avx/*.cpp") |
|
|
|
|
foreach(src ${avx_srcs}) |
|
|
|
|
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS -mavx) |
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX) |
|
|
|
|
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS -mavx) |
|
|
|
|
elseif(MSVC AND NOT MSVC_VERSION LESS 1600) |
|
|
|
|
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS /arch:AVX) |
|
|
|
|
endif() |
|
|
|
|
endforeach() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(ENABLE_AVX2) |
|
|
|
|
file(GLOB avx2_srcs "src/avx2/*.cpp") |
|
|
|
|
foreach(src ${avx2_srcs}) |
|
|
|
|
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS -mavx2) |
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX) |
|
|
|
|
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS -mavx2) |
|
|
|
|
elseif(MSVC AND NOT MSVC_VERSION LESS 1800) |
|
|
|
|
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS /arch:AVX2) |
|
|
|
|
endif() |
|
|
|
|
endforeach() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|