@@ -91,6 +91,14 @@ if(POLICY CMP0042)
91
91
cmake_policy (SET CMP0042 NEW )
92
92
endif ()
93
93
94
+ if (POLICY CMP0051 )
95
+ cmake_policy (SET CMP0051 NEW )
96
+ endif ()
97
+
98
+ if (POLICY CMP0056 )
99
+ cmake_policy (SET CMP0056 NEW )
100
+ endif ()
101
+
94
102
include (cmake/OpenCVUtils.cmake )
95
103
96
104
# must go before the project command
@@ -280,16 +288,6 @@ OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov"
280
288
OCV_OPTION (ENABLE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON IF CMAKE_COMPILER_IS_GNUCXX AND NOT (APPLE AND CMAKE_COMPILER_IS_CLANGCXX ) )
281
289
OCV_OPTION (ENABLE_POWERPC "Enable PowerPC for GCC" ON IF (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.* ) )
282
290
OCV_OPTION (ENABLE_FAST_MATH "Enable -ffast-math (not recommended for GCC 4.6.x)" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64 )) )
283
- OCV_OPTION (ENABLE_SSE "Enable SSE instructions" ON IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
284
- OCV_OPTION (ENABLE_SSE2 "Enable SSE2 instructions" ON IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
285
- OCV_OPTION (ENABLE_SSE3 "Enable SSE3 instructions" ON IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX OR CV_ICC ) AND (X86 OR X86_64 )) )
286
- OCV_OPTION (ENABLE_SSSE3 "Enable SSSE3 instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
287
- OCV_OPTION (ENABLE_SSE41 "Enable SSE4.1 instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX OR CV_ICC ) AND (X86 OR X86_64 )) )
288
- OCV_OPTION (ENABLE_SSE42 "Enable SSE4.2 instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
289
- OCV_OPTION (ENABLE_POPCNT "Enable POPCNT instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
290
- OCV_OPTION (ENABLE_AVX "Enable AVX instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
291
- OCV_OPTION (ENABLE_AVX2 "Enable AVX2 instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
292
- OCV_OPTION (ENABLE_FMA3 "Enable FMA3 instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX ) AND (X86 OR X86_64 )) )
293
291
OCV_OPTION (ENABLE_NEON "Enable NEON instructions" "${NEON} " IF CMAKE_COMPILER_IS_GNUCXX AND (ARM OR AARCH64 OR IOS ) )
294
292
OCV_OPTION (ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF CMAKE_COMPILER_IS_GNUCXX AND (ARM OR AARCH64 OR IOS ) )
295
293
OCV_OPTION (ENABLE_NOISY_WARNINGS "Show all warnings even if they are too noisy" OFF )
@@ -299,6 +297,9 @@ OCV_OPTION(ENABLE_IMPL_COLLECTION "Collect implementation data on function c
299
297
OCV_OPTION (ENABLE_INSTRUMENTATION "Instrument functions to collect calls trace and performance" OFF )
300
298
OCV_OPTION (ENABLE_GNU_STL_DEBUG "Enable GNU STL Debug mode (defines _GLIBCXX_DEBUG)" OFF IF ((NOT CMAKE_VERSION VERSION_LESS "2.8.11" ) AND CMAKE_COMPILER_IS_GNUCXX ) )
301
299
OCV_OPTION (GENERATE_ABI_DESCRIPTOR "Generate XML file for abi_compliance_checker tool" OFF IF UNIX )
300
+ OCV_OPTION (CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON )
301
+ OCV_OPTION (CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF )
302
+
302
303
303
304
OCV_OPTION (DOWNLOAD_EXTERNAL_TEST_DATA "Download external test data (Python executable and OPENCV_TEST_DATA_PATH environment variable may be required)" OFF )
304
305
@@ -499,6 +500,9 @@ if(CMAKE_GENERATOR MATCHES "Makefiles|Ninja" AND "${CMAKE_BUILD_TYPE}" STREQUAL
499
500
set (CMAKE_BUILD_TYPE Release )
500
501
endif ()
501
502
503
+ # --- Python Support ---
504
+ include (cmake/OpenCVDetectPython.cmake )
505
+
502
506
include (cmake/OpenCVCompilerOptions.cmake )
503
507
504
508
@@ -578,9 +582,6 @@ else()
578
582
unset (DOXYGEN_FOUND CACHE )
579
583
endif ()
580
584
581
- # --- Python Support ---
582
- include (cmake/OpenCVDetectPython.cmake )
583
-
584
585
# --- Java Support ---
585
586
include (cmake/OpenCVDetectApacheAnt.cmake )
586
587
if (ANDROID )
@@ -869,6 +870,33 @@ if(NOT CMAKE_GENERATOR MATCHES "Xcode|Visual Studio")
869
870
status (" Configuration:" ${CMAKE_BUILD_TYPE} )
870
871
endif ()
871
872
873
+
874
+ # ========================= CPU code generation mode =========================
875
+ status ("" )
876
+ status (" CPU/HW features:" )
877
+ status (" Baseline:" "${CPU_BASELINE_FINAL} " )
878
+ if (NOT CPU_BASELINE STREQUAL CPU_BASELINE_FINAL )
879
+ status (" requested:" "${CPU_BASELINE} " )
880
+ endif ()
881
+ if (CPU_BASELINE_REQUIRE )
882
+ status (" required:" "${CPU_BASELINE_REQUIRE} " )
883
+ endif ()
884
+ if (CPU_BASELINE_DISABLE )
885
+ status (" disabled:" "${CPU_BASELINE_DISABLE} " )
886
+ endif ()
887
+ if (CPU_DISPATCH_FINAL OR CPU_DISPATCH )
888
+ status (" Dispatched code generation:" "${CPU_DISPATCH_FINAL} " )
889
+ if (NOT CPU_DISPATCH STREQUAL CPU_DISPATCH_FINAL )
890
+ status (" requested:" "${CPU_DISPATCH} " )
891
+ endif ()
892
+ if (CPU_DISPATCH_REQUIRE )
893
+ status (" required:" "${CPU_DISPATCH_REQUIRE} " )
894
+ endif ()
895
+ foreach (OPT ${CPU_DISPATCH_FINAL} )
896
+ status (" ${OPT} (${CPU_${OPT} _USAGE_COUNT} files):" "+ ${CPU_DISPATCH_${OPT} _INCLUDED}" )
897
+ endforeach ()
898
+ endif ()
899
+
872
900
# ========================== C/C++ options ==========================
873
901
if (CMAKE_CXX_COMPILER_VERSION )
874
902
set (OPENCV_COMPILER_STR "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} (ver ${CMAKE_CXX_COMPILER_VERSION} )" )
0 commit comments