mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 12:19:50 +01:00
Merge pull request #26710 from Kumataro:fix26709
core: validate OPENCV_ALGO_HINT_DEFAULT option
This commit is contained in:
commit
0da8c760d3
|
|
@ -767,6 +767,13 @@ elseif(WIN32)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED OPENCV_ALGO_HINT_DEFAULT)
|
||||||
|
if(NOT OPENCV_ALGO_HINT_DEFAULT STREQUAL "ALGO_HINT_ACCURATE" AND
|
||||||
|
NOT OPENCV_ALGO_HINT_DEFAULT STREQUAL "ALGO_HINT_APPROX")
|
||||||
|
message(FATAL_ERROR "OPENCV_ALGO_HINT_DEFAULT should be one of ALGO_HINT_ACCURATE or ALGO_HINT_APPROX.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
include(cmake/OpenCVPCHSupport.cmake)
|
include(cmake/OpenCVPCHSupport.cmake)
|
||||||
include(cmake/OpenCVModule.cmake)
|
include(cmake/OpenCVModule.cmake)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ Following options can be used to produce special builds with instrumentation or
|
||||||
| `ENABLE_BUILD_HARDENING` | GCC, Clang, MSVC | Enable compiler options which reduce possibility of code exploitation. |
|
| `ENABLE_BUILD_HARDENING` | GCC, Clang, MSVC | Enable compiler options which reduce possibility of code exploitation. |
|
||||||
| `ENABLE_LTO` | GCC, Clang, MSVC | Enable Link Time Optimization (LTO). |
|
| `ENABLE_LTO` | GCC, Clang, MSVC | Enable Link Time Optimization (LTO). |
|
||||||
| `ENABLE_THIN_LTO` | Clang | Enable thin LTO which incorporates intermediate bitcode to binaries allowing consumers optimize their applications later. |
|
| `ENABLE_THIN_LTO` | Clang | Enable thin LTO which incorporates intermediate bitcode to binaries allowing consumers optimize their applications later. |
|
||||||
| `OPENCV_ALGO_HINT_DEFAULT` | Any | Set default OpenCV implementation hint value: `ALGO_HINT_ACCURATE` or `ALGO_HINT_APROX`. Dangerous! The option changes behaviour globally and may affect accuracy of many algorithms. |
|
| `OPENCV_ALGO_HINT_DEFAULT` | Any | Set default OpenCV implementation hint value: `ALGO_HINT_ACCURATE` or `ALGO_HINT_APPROX`. Dangerous! The option changes behaviour globally and may affect accuracy of many algorithms. |
|
||||||
|
|
||||||
@see [GCC instrumentation](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)
|
@see [GCC instrumentation](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)
|
||||||
@see [Build hardening](https://en.wikipedia.org/wiki/Hardening_(computing))
|
@see [Build hardening](https://en.wikipedia.org/wiki/Hardening_(computing))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user