From 81c5fae56fdd3566703b970f1cebfc8266ab609f Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 24 Jan 2018 14:53:04 +0300 Subject: [PATCH] core(lapack): fix build issues related to 'extern "C"' --- cmake/OpenCVFindLAPACK.cmake | 2 +- cmake/checks/lapack_check.cpp | 1 + modules/core/src/hal_internal.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVFindLAPACK.cmake b/cmake/OpenCVFindLAPACK.cmake index f4f9415..6848180 100644 --- a/cmake/OpenCVFindLAPACK.cmake +++ b/cmake/OpenCVFindLAPACK.cmake @@ -31,7 +31,7 @@ macro(ocv_lapack_check) else() # adding proxy opencv_lapack.h header set(CBLAS_H_PROXY_PATH ${CMAKE_BINARY_DIR}/opencv_lapack.h) - if(APPLE) + if((APPLE OR OPENCV_SKIP_LAPACK_EXTERN_C) AND NOT OPENCV_FORCE_LAPACK_EXTERN_C) set(_lapack_include_str_extern_C "") set(_lapack_include_str_extern_C_end "") else() diff --git a/cmake/checks/lapack_check.cpp b/cmake/checks/lapack_check.cpp index 0457c44..6ac104b 100644 --- a/cmake/checks/lapack_check.cpp +++ b/cmake/checks/lapack_check.cpp @@ -1,3 +1,4 @@ +#include #include "opencv_lapack.h" static char* check_fn1 = (char*)sgesv_; diff --git a/modules/core/src/hal_internal.cpp b/modules/core/src/hal_internal.cpp index d98cd30..ecf5ffa 100644 --- a/modules/core/src/hal_internal.cpp +++ b/modules/core/src/hal_internal.cpp @@ -46,6 +46,7 @@ #ifdef HAVE_LAPACK +#include #include "opencv_lapack.h" #include -- 2.7.4