mirror of
https://github.com/opencv/opencv.git
synced 2024-12-14 00:39:13 +08:00
2ee9d21dae
Added clapack * bring a small subset of Lapack, automatically converted to C, into OpenCV * added missing lsame_ prototype * * small fix in make_clapack script * trying to fix remaining CI problems * fixed character arrays' initializers * get rid of F2C_STR_MAX * * added back single-precision versions for QR, LU and Cholesky decompositions. It adds very little extra overhead. * added stub version of sdesdd. * uncommented calls to all the single-precision Lapack functions from opencv/core/src/hal_internal.cpp. * fixed warning from Visual Studio + cleaned f2c runtime a bit * * regenerated Lapack w/o forward declarations of intrinsic functions (such as sqrt(), r_cnjg() etc.) * at once, trailing whitespaces are removed from the generated sources, just in case * since there is no declarations of intrinsic functions anymore, we could turn some of them into inline functions * trying to eliminate the crash on ARM * fixed API and semantics of s_copy * * CLapack has been tested successfully. It's now time to restore the standard LAPACK detection procedure * removed some more trailing whitespaces * * retained only the essential stuff in CLapack * added checks to lapack calls to gracefully return "not implemented" instead of returning invalid results with "ok" status * disabled warning when building lapack * cmake: update LAPACK detection Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
49 lines
1.7 KiB
CMake
49 lines
1.7 KiB
CMake
# ----------------------------------------------------------------------------
|
|
# CMake file for opencv_lapack. See root CMakeLists.txt
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
project(clapack)
|
|
|
|
# TODO: extract it from sources somehow
|
|
set(CLAPACK_VERSION "3.9.0" PARENT_SCOPE)
|
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
|
|
|
|
# The .cpp files:
|
|
file(GLOB lapack_srcs src/*.c)
|
|
file(GLOB runtime_srcs runtime/*.c)
|
|
file(GLOB lib_hdrs include/*.h)
|
|
|
|
# ----------------------------------------------------------------------------------
|
|
# Define the library target:
|
|
# ----------------------------------------------------------------------------------
|
|
|
|
set(the_target "libclapack")
|
|
|
|
add_library(${the_target} STATIC ${lapack_srcs} ${runtime_srcs} ${lib_hdrs})
|
|
|
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-parentheses -Wno-uninitialized -Wno-array-bounds
|
|
-Wno-implicit-function-declaration -Wno-unused -Wunused-parameter) # gcc/clang warnings
|
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4244 /wd4554 /wd4723) # visual studio warnings
|
|
|
|
set_target_properties(${the_target}
|
|
PROPERTIES OUTPUT_NAME ${the_target}
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
COMPILE_PDB_NAME ${the_target}
|
|
COMPILE_PDB_NAME_DEBUG "${the_target}${OPENCV_DEBUG_POSTFIX}"
|
|
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
|
|
)
|
|
|
|
set(CLAPACK_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
|
|
set(CLAPACK_LIBRARIES ${the_target} PARENT_SCOPE)
|
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
|
set_target_properties(${the_target} PROPERTIES FOLDER "3rdparty")
|
|
endif()
|
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
|
ocv_install_target(${the_target} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
|
endif()
|
|
|
|
ocv_install_3rdparty_licenses(clapack lapack_LICENSE)
|