OCV_OPTION(INSTALL_C_EXAMPLES "Install C examples" OFF )
OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF )
OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID )
OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID )
OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF(UNIX AND NOT ANDROID AND NOT IOS AND BUILD_SHARED_LIBS))
OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF(NOT IOS))
OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs"${ENABLE_SOLUTION_FOLDERS0}IF(CMAKE_VERSION VERSION_GREATER "2.8.0"))
OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs"(MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode)IF(CMAKE_VERSION VERSION_GREATER "2.8.0"))
OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX )
OCV_OPTION(ENABLE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON IF CMAKE_COMPILER_IS_GNUCXX )
OCV_OPTION(ENABLE_POWERPC "Enable PowerPC for GCC" ON IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.*))
# SSE3 and further should be disabled under MingW because it generates compiler errors
if(NOT MINGW)
if(ENABLE_SSE3)
add_extra_compiler_option(-msse3)
if(ENABLE_AVX)
add_extra_compiler_option(-mavx)
endif()
if(${CMAKE_OPENCV_GCC_VERSION_NUM} GREATER 402)
set(HAVE_GCC43_OR_NEWER 1)
endif()
if(${CMAKE_OPENCV_GCC_VERSION_NUM} GREATER 401)
set(HAVE_GCC42_OR_NEWER 1)
endif()
# GCC depresses SSEx instructions when -mavx is used. Instead, it generates new AVX instructions or AVX equivalence for all SSEx instructions when needed.
if(NOT OPENCV_EXTRA_CXX_FLAGS MATCHES "-mavx")
if(ENABLE_SSE3)
add_extra_compiler_option(-msse3)
endif()
if(HAVE_GCC42_OR_NEWER OR APPLE)
if(ENABLE_SSSE3)
add_extra_compiler_option(-mssse3)
endif()
if(HAVE_GCC43_OR_NEWER OR APPLE)
if(ENABLE_SSE41)
add_extra_compiler_option(-msse4.1)
endif()
if(ENABLE_SSE42)
add_extra_compiler_option(-msse4.2)
endif()
if(ENABLE_SSE41)
add_extra_compiler_option(-msse4.1)
endif()
if(ENABLE_SSE42)
add_extra_compiler_option(-msse4.2)
endif()
endif()
endif(NOT MINGW)
if(X86 OR X86_64)
if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
if(ENABLE_SSE2)
if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)")
add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers