@@ -91,6 +91,10 @@ 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
+
94
98
include (cmake/OpenCVUtils.cmake )
95
99
96
100
# must go before the project command
@@ -280,16 +284,6 @@ OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov"
280
284
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
285
OCV_OPTION (ENABLE_POWERPC "Enable PowerPC for GCC" ON IF (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.* ) )
282
286
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
287
OCV_OPTION (ENABLE_NEON "Enable NEON instructions" "${NEON} " IF CMAKE_COMPILER_IS_GNUCXX AND (ARM OR AARCH64 OR IOS ) )
294
288
OCV_OPTION (ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF CMAKE_COMPILER_IS_GNUCXX AND (ARM OR AARCH64 OR IOS ) )
295
289
OCV_OPTION (ENABLE_NOISY_WARNINGS "Show all warnings even if they are too noisy" OFF )
@@ -299,6 +293,9 @@ OCV_OPTION(ENABLE_IMPL_COLLECTION "Collect implementation data on function c
299
293
OCV_OPTION (ENABLE_INSTRUMENTATION "Instrument functions to collect calls trace and performance" OFF )
300
294
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
295
OCV_OPTION (GENERATE_ABI_DESCRIPTOR "Generate XML file for abi_compliance_checker tool" OFF IF UNIX )
296
+ OCV_OPTION (CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON )
297
+ OCV_OPTION (CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF )
298
+
302
299
303
300
OCV_OPTION (DOWNLOAD_EXTERNAL_TEST_DATA "Download external test data (Python executable and OPENCV_TEST_DATA_PATH environment variable may be required)" OFF )
304
301
@@ -499,6 +496,9 @@ if(CMAKE_GENERATOR MATCHES "Makefiles|Ninja" AND "${CMAKE_BUILD_TYPE}" STREQUAL
499
496
set (CMAKE_BUILD_TYPE Release )
500
497
endif ()
501
498
499
+ # --- Python Support ---
500
+ include (cmake/OpenCVDetectPython.cmake )
501
+
502
502
include (cmake/OpenCVCompilerOptions.cmake )
503
503
504
504
@@ -578,9 +578,6 @@ else()
578
578
unset (DOXYGEN_FOUND CACHE )
579
579
endif ()
580
580
581
- # --- Python Support ---
582
- include (cmake/OpenCVDetectPython.cmake )
583
-
584
581
# --- Java Support ---
585
582
include (cmake/OpenCVDetectApacheAnt.cmake )
586
583
if (ANDROID )
@@ -869,6 +866,33 @@ if(NOT CMAKE_GENERATOR MATCHES "Xcode|Visual Studio")
869
866
status (" Configuration:" ${CMAKE_BUILD_TYPE} )
870
867
endif ()
871
868
869
+
870
+ # ========================= CPU code generation mode =========================
871
+ status ("" )
872
+ status (" CPU/HW features:" )
873
+ status (" Baseline:" "${CPU_BASELINE_FINAL} " )
874
+ if (NOT CPU_BASELINE STREQUAL CPU_BASELINE_FINAL )
875
+ status (" requested:" "${CPU_BASELINE} " )
876
+ endif ()
877
+ if (CPU_BASELINE_REQUIRE )
878
+ status (" required:" "${CPU_BASELINE_REQUIRE} " )
879
+ endif ()
880
+ if (CPU_BASELINE_DISABLE )
881
+ status (" disabled:" "${CPU_BASELINE_DISABLE} " )
882
+ endif ()
883
+ if (CPU_DISPATCH_FINAL OR CPU_DISPATCH )
884
+ status (" Dispatched code generation:" "${CPU_DISPATCH_FINAL} " )
885
+ if (NOT CPU_DISPATCH STREQUAL CPU_DISPATCH_FINAL )
886
+ status (" requested:" "${CPU_DISPATCH} " )
887
+ endif ()
888
+ if (CPU_DISPATCH_REQUIRE )
889
+ status (" required:" "${CPU_DISPATCH_REQUIRE} " )
890
+ endif ()
891
+ foreach (OPT ${CPU_DISPATCH_FINAL} )
892
+ status (" ${OPT} (${CPU_${OPT} _USAGE_COUNT} files):" "+ ${CPU_DISPATCH_${OPT} _INCLUDED}" )
893
+ endforeach ()
894
+ endif ()
895
+
872
896
# ========================== C/C++ options ==========================
873
897
if (CMAKE_CXX_COMPILER_VERSION )
874
898
set (OPENCV_COMPILER_STR "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} (ver ${CMAKE_CXX_COMPILER_VERSION} )" )
0 commit comments