Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
9941c671
Commit
9941c671
authored
Dec 10, 2013
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NEON instruction set control unified for regular and cross-compiler builds.
parent
9dea590a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
9 deletions
+23
-9
CMakeLists.txt
CMakeLists.txt
+11
-0
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+6
-0
arm_crosscompile_with_cmake.rst
...oduction/crosscompilation/arm_crosscompile_with_cmake.rst
+2
-2
arm-gnueabi.toolchain.cmake
platforms/linux/arm-gnueabi.toolchain.cmake
+4
-7
No files found.
CMakeLists.txt
View file @
9941c671
...
...
@@ -214,6 +214,8 @@ OCV_OPTION(ENABLE_SSSE3 "Enable SSSE3 instructions"
OCV_OPTION
(
ENABLE_SSE41
"Enable SSE4.1 instructions"
OFF
IF
((
CV_ICC OR CMAKE_COMPILER_IS_GNUCXX
)
AND
(
X86 OR X86_64
))
)
OCV_OPTION
(
ENABLE_SSE42
"Enable SSE4.2 instructions"
OFF
IF
(
CMAKE_COMPILER_IS_GNUCXX
AND
(
X86 OR X86_64
))
)
OCV_OPTION
(
ENABLE_AVX
"Enable AVX instructions"
OFF
IF
((
MSVC OR CMAKE_COMPILER_IS_GNUCXX
)
AND
(
X86 OR X86_64
))
)
OCV_OPTION
(
ENABLE_NEON
"Enable NEON instructions"
OFF IF CMAKE_COMPILER_IS_GNUCXX AND ARM
)
OCV_OPTION
(
ENABLE_VFPV3
"Enable VFPv3-D32 instructions"
OFF IF CMAKE_COMPILER_IS_GNUCXX AND ARM
)
OCV_OPTION
(
ENABLE_NOISY_WARNINGS
"Show all warnings even if they are too noisy"
OFF
)
OCV_OPTION
(
OPENCV_WARNINGS_ARE_ERRORS
"Treat warnings as errors"
OFF
)
OCV_OPTION
(
ENABLE_WINRT_MODE
"Build with Windows Runtime support"
OFF IF WIN32
)
...
...
@@ -240,6 +242,15 @@ include(cmake/OpenCVVersion.cmake)
# Save libs and executables in the same place
set
(
EXECUTABLE_OUTPUT_PATH
"
${
CMAKE_BINARY_DIR
}
/bin"
CACHE PATH
"Output directory for applications"
)
if
(
ANDROID
)
if
(
ANDROID_ABI MATCHES
"NEON"
)
set
(
ENABLE_NEON ON
)
endif
()
if
(
ANDROID_ABI MATCHES
"VFPV3"
)
set
(
ENABLE_VFPV3 ON
)
endif
()
endif
()
if
(
ANDROID OR WIN32
)
set
(
OPENCV_DOC_INSTALL_PATH doc
)
elseif
(
INSTALL_TO_MANGLED_PATHS
)
...
...
cmake/OpenCVCompilerOptions.cmake
View file @
9941c671
...
...
@@ -130,6 +130,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if
(
ENABLE_SSE2
)
add_extra_compiler_option
(
-msse2
)
endif
()
if
(
ENABLE_NEON
)
add_extra_compiler_option
(
"-mfpu=neon"
)
endif
()
if
(
ENABLE_VFPV3 AND NOT ENABLE_NEON
)
add_extra_compiler_option
(
"-mfpu=vfpv3"
)
endif
()
# SSE3 and further should be disabled under MingW because it generates compiler errors
if
(
NOT MINGW
)
...
...
doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.rst
View file @
9941c671
...
...
@@ -106,8 +106,8 @@ Enable hardware optimizations
-----------------------------
Depending on target platform architecture different instruction sets can be used. By default
compiler generates code for armv5l without VFPv3 and NEON extensions. Add ``-D
US
E_VFPV3=ON``
to cmake command line to enable code generation for VFPv3 and ``-D
US
E_NEON=ON`` for using
compiler generates code for armv5l without VFPv3 and NEON extensions. Add ``-D
ENABL
E_VFPV3=ON``
to cmake command line to enable code generation for VFPv3 and ``-D
ENABL
E_NEON=ON`` for using
NEON SIMD extensions.
TBB is supported on multi core ARM SoCs also.
...
...
platforms/linux/arm-gnueabi.toolchain.cmake
View file @
9941c671
...
...
@@ -28,14 +28,11 @@ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-s
set
(
CMAKE_EXE_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_EXE_LINKER_FLAGS
}
"
)
if
(
USE_NEON
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=neon"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=neon"
)
message
(
WARNING
"You use obsolete variable USE_NEON to enable NEON instruction set. Use -DENABLE_NEON=ON instead."
)
set
(
ENABLE_NEON TRUE
)
elseif
(
USE_VFPV3
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=vfpv3"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=vfpv3"
)
else
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=vfpv3-d16"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=vfpv3-d16"
)
message
(
WARNING
"You use obsolete variable USE_VFPV3 to enable VFPV3 instruction set. Use -DENABLE_VFPV3=ON instead."
)
set
(
ENABLE_VFPV3 TRUE
)
endif
()
set
(
CMAKE_FIND_ROOT_PATH
${
CMAKE_FIND_ROOT_PATH
}
${
ARM_LINUX_SYSROOT
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment