File tree Expand file tree Collapse file tree 5 files changed +42
-627
lines changed Expand file tree Collapse file tree 5 files changed +42
-627
lines changed Original file line number Diff line number Diff line change @@ -551,6 +551,7 @@ if(UNIX)
551
551
endif ()
552
552
include (CheckFunctionExists )
553
553
include (CheckIncludeFile )
554
+ include (CheckSymbolExists )
554
555
555
556
if (NOT APPLE )
556
557
CHECK_INCLUDE_FILE (pthread.h HAVE_LIBPTHREAD )
@@ -566,6 +567,12 @@ if(UNIX)
566
567
else ()
567
568
set (HAVE_LIBPTHREAD YES )
568
569
endif ()
570
+
571
+ CHECK_SYMBOL_EXISTS (posix_memalign stdlib.h HAVE_POSIX_MEMALIGN )
572
+ CHECK_INCLUDE_FILE (malloc.h HAVE_MALLOC_H )
573
+ if (HAVE_MALLOC_H )
574
+ CHECK_SYMBOL_EXISTS (memalign malloc.h HAVE_MEMALIGN )
575
+ endif ()
569
576
endif ()
570
577
571
578
include (cmake/OpenCVPCHSupport.cmake )
Original file line number Diff line number Diff line change @@ -45,6 +45,16 @@ endif()
45
45
if (ITT_INCLUDE_DIRS )
46
46
ocv_module_include_directories (${ITT_INCLUDE_DIRS} )
47
47
endif ()
48
+ if (HAVE_POSIX_MEMALIGN )
49
+ ocv_append_sourge_file_compile_definitions (${CMAKE_CURRENT_SOURCE_DIR} /src/alloc.cpp "HAVE_POSIX_MEMALIGN=1" )
50
+ endif ()
51
+ if (HAVE_MALLOC_H )
52
+ ocv_append_sourge_file_compile_definitions (${CMAKE_CURRENT_SOURCE_DIR} /src/alloc.cpp "HAVE_MALLOC_H=1" )
53
+ endif ()
54
+ if (HAVE_MEMALIGN )
55
+ ocv_append_sourge_file_compile_definitions (${CMAKE_CURRENT_SOURCE_DIR} /src/alloc.cpp "HAVE_MEMALIGN=1" )
56
+ endif ()
57
+
48
58
ocv_create_module (${extra_libs} )
49
59
50
60
ocv_target_link_libraries (${the_module}
You can’t perform that action at this time.
0 commit comments