mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 15:49:07 +08:00
47d206e149
* [many ports] improve compatibility with WSL and mixed case filesystems * [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there * [libharu] add compatibility with non-win32 platforms * [geogram] fix openblas on linux [clapack] better integration with linux environment [visit-struct] put cmake config file in the expected folder [geogram] remove trailing underscore to enable compatibility with OpenBLAS * [openblas] playing with underscore, without success * [openblas/lapack] fix library integration * [clapack] improve target handling in cmake module * [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs * [clapack,openblas] improve libraries integration * [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags * [suitesparse] improve integration with new lapack/openblas mechanism * [suitesparse] add no underscore postfix also for linux * [ceres] fix integration with newer openblas/lapack configs * [aws-c-event-stream] fix regression * [systemc] fix regression * [libwebp,geogram] trigger rebuild * [libwebp,pthread4w] fix regressions * [glbinding] fix cmake module installation * [globjects] disentangle unnecessary dependency from qt5 * [jasper] remove broken and unnecessary patches * [libwebp] fix regression * [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files * [clapack] correctly find dlls * [clapack] use a generic blas as dependency * [fizz,g2o] restore expected version * fix mistake * [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports * [libressl,openssl] do not try to build one if the other is already installed * [itk] update ref and patch to avoid regression * [libressl,openssl] implement full strategy to fix CI * [libwebp] disable components that are broken on macOS * [ogre] enable macOS build * [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169 * [ogre] add missing install command * [ffmpeg] enable wrapper for cmake module * [ffmpeg] add avresample module finder * [ffmpeg] improve module detection and exported symbols * [ffmpeg] add variables to cache * [thrift] remove unnecessary build option * [allegro5] fix shared/static inversion * [protobuf] cleanup * [libressl] cleanup * [moos-core] cleanup * commented features must not be separated from other features, otherwise vcpkg complains * [itk] fix regression * [shogun,itk] fix regressions * [ogre] fix regression * [opusfile] add compatibility with non-win32 * [itk] fix regression * [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile * add missing dependencies * [ismrmrd] fix regression * [ffmpeg] trigger rebuild * [clapack,openblas,libogg] fix regressions on macOS * [libtins] fix regression * force rebuild windows regressions, unable to reproduce locally * [mosquitto] enable non-win32 builds * [json-dto] force rebuild, unable to reproduce regression locally * [many ports] uniform naming and path length requests * fix regression * fix regression * [ffmpeg] fixes for downstream projects * clean up - thanks to reviewers * trigger rebuild of regressions on macOS * trigger rebuild of regressions on macOS - part2 * Add core back * Use VCPKG_CONCURRENCY * Add core back to suitesparse * Add core back to curl * Add core back to magnum * Add core back to magnum * Add core back to magnum * Add core back to cgal
151 lines
6.5 KiB
Diff
151 lines
6.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 3486f05..b8c2e63 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -191,68 +191,14 @@ if(WITH_CUDA)
|
|
ENDIF(${CUDA_FOUND})
|
|
endif()
|
|
|
|
-find_package(BLAS)
|
|
-find_package(LAPACK)
|
|
-if (LAPACK_FOUND AND BLAS_FOUND)
|
|
+find_package(BLAS REQUIRED)
|
|
+find_package(LAPACK REQUIRED)
|
|
+if(LAPACK_FOUND AND BLAS_FOUND)
|
|
message(STATUS "found lapack and blas config file. Linking targets lapack and blas")
|
|
set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
|
|
-else () # LAPACK is not found
|
|
-
|
|
-## Need to use SuiteSparse_LINKER_LAPACK_BLAS_LIBS in our subproject in case of SHARED flag is set to ON
|
|
-SET(SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS OFF CACHE BOOL "Check if you have custom LAPACK/BLAS libraries (AMD,...)")
|
|
-IF (SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS)
|
|
- SET(SUITESPARSE_CUSTOM_BLAS_LIB "" CACHE FILE "Path to custom library file for BLAS")
|
|
- SET(SUITESPARSE_CUSTOM_LAPACK_LIB "" CACHE FILE "Path to custom library file for LAPACK")
|
|
- IF (NOT EXISTS "${SUITESPARSE_CUSTOM_BLAS_LIB}" OR NOT EXISTS "${SUITESPARSE_CUSTOM_LAPACK_LIB}")
|
|
- MESSAGE("*Error*: Correctly set SUITESPARSE_CUSTOM_BLAS_LIB and SUITESPARSE_CUSTOM_LAPACK_LIB or uncheck SUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS")
|
|
- ELSE()
|
|
- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${SUITESPARSE_CUSTOM_BLAS_LIB} ${SUITESPARSE_CUSTOM_LAPACK_LIB})
|
|
- ENDIF()
|
|
-ELSE()
|
|
- IF (UNIX)
|
|
- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS lapack blas rt)
|
|
- ELSE()
|
|
- IF(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes!
|
|
- set(PATH_WORD_SIZE "x64")
|
|
- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes!
|
|
- set(PATH_WORD_SIZE "x32")
|
|
- ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
-
|
|
- add_library(blas SHARED IMPORTED)
|
|
- set_property(TARGET blas PROPERTY IMPORTED_LOCATION ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/libblas.dll)
|
|
- set_property(TARGET blas PROPERTY IMPORTED_IMPLIB ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/libblas.lib)
|
|
-
|
|
- add_library(lapack SHARED IMPORTED)
|
|
- set_property(TARGET lapack PROPERTY IMPORTED_LOCATION ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/liblapack.dll)
|
|
- set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB ${SuiteSparseProject_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/liblapack.lib)
|
|
-
|
|
- SET(SuiteSparse_LINKER_LAPACK_BLAS_LIBS blas lapack)
|
|
-
|
|
- ## install lapack and blas dependencies
|
|
- file(GLOB lapack_blas_windows_libs "${CMAKE_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/*.lib")
|
|
- file(GLOB lapack_blas_windows_dll "${CMAKE_SOURCE_DIR}/lapack_windows/${PATH_WORD_SIZE}/*.dll")
|
|
- if(lapack_blas_windows_dll AND lapack_blas_windows_libs)
|
|
- set(SuiteSparse_LAPACK_BLAS_LIB_DIR "lib${LIB_POSTFIX}/lapack_blas_windows")
|
|
- install(FILES ${lapack_blas_windows_libs}
|
|
- ${lapack_blas_windows_dll}
|
|
- DESTINATION ${SuiteSparse_LAPACK_BLAS_LIB_DIR}
|
|
- )
|
|
- endif()
|
|
- ENDIF()
|
|
-ENDIF()
|
|
-ENDIF() # LAPACK found
|
|
-
|
|
-if(SuiteSparse_LAPACK_BLAS_LIB_DIR) # "Export" the imported targets in config.cmake manually
|
|
- set(ExternConfig "add_library(blas SHARED IMPORTED)
|
|
- set_property(TARGET blas PROPERTY IMPORTED_LOCATION \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/libblas.dll)
|
|
- set_property(TARGET blas PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/libblas.lib)
|
|
-
|
|
- add_library(lapack SHARED IMPORTED)
|
|
- set_property(TARGET lapack PROPERTY IMPORTED_LOCATION \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.dll)
|
|
- set_property(TARGET lapack PROPERTY IMPORTED_IMPLIB \${_SuiteSparse_PREFIX}/${SuiteSparse_LAPACK_BLAS_LIB_DIR}/liblapack.lib)")
|
|
-endif()
|
|
+endif() # LAPACK is not found
|
|
|
|
-IF(BUILD_METIS)
|
|
+IF(BUILD_METIS OR USE_VCPKG_METIS)
|
|
set(SuiteSparse_LINKER_METIS_LIBS "metis")
|
|
## namespaced library target for config
|
|
set(SuiteSparse_EXPORTED_METIS_LIBS "SuiteSparse::metis")
|
|
@@ -311,7 +257,7 @@ configure_file(cmake/SuiteSparse-config-install.cmake.in
|
|
## do the EXPORT for allowing other project to easily use suitesparse with cmake
|
|
install(EXPORT SuiteSparseTargets
|
|
FILE
|
|
- SuiteSparse-targets.cmake
|
|
+ suitesparse-targets.cmake
|
|
NAMESPACE
|
|
SuiteSparse::
|
|
DESTINATION
|
|
diff --git a/SuiteSparse/CHOLMOD/Include/cholmod_blas.h b/SuiteSparse/CHOLMOD/Include/cholmod_blas.h
|
|
index aef3e63..907512b 100644
|
|
--- a/SuiteSparse/CHOLMOD/Include/cholmod_blas.h
|
|
+++ b/SuiteSparse/CHOLMOD/Include/cholmod_blas.h
|
|
@@ -27,6 +27,7 @@
|
|
#elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86)
|
|
#define CHOLMOD_LINUX
|
|
#define CHOLMOD_ARCHITECTURE "Linux"
|
|
+#define BLAS_NO_UNDERSCORE
|
|
|
|
#elif defined (__APPLE__)
|
|
#define CHOLMOD_MAC
|
|
diff --git a/SuiteSparse/CMakeLists.txt b/SuiteSparse/CMakeLists.txt
|
|
index c6e2834..5ef08a6 100644
|
|
--- a/SuiteSparse/CMakeLists.txt
|
|
+++ b/SuiteSparse/CMakeLists.txt
|
|
@@ -12,11 +12,11 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
|
|
# Global flags:
|
|
-IF (BUILD_METIS)
|
|
+IF (BUILD_METIS OR USE_VCPKG_METIS)
|
|
INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include")
|
|
-ELSE (BUILD_METIS)
|
|
+ELSE ()
|
|
ADD_DEFINITIONS(-DNPARTITION)
|
|
-ENDIF ( BUILD_METIS)
|
|
+ENDIF ()
|
|
|
|
# Disable COMPLEX numbers: disable it by default, since it causes problems in some platforms.
|
|
SET(HAVE_COMPLEX OFF CACHE BOOL "Enables building SuiteSparse with complex numbers (disabled by default to avoid problems in some platforms)")
|
|
diff --git a/cmake/SuiteSparse-config-install.cmake.in b/cmake/SuiteSparse-config-install.cmake.in
|
|
index cb1f51f..49387b8 100644
|
|
--- a/cmake/SuiteSparse-config-install.cmake.in
|
|
+++ b/cmake/SuiteSparse-config-install.cmake.in
|
|
@@ -4,13 +4,10 @@ get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_SELF_DIR}" PATH)
|
|
get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH)
|
|
get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH)
|
|
|
|
-find_package(LAPACK CONFIG)
|
|
-if (NOT LAPACK_FOUND) # Load the LAPACK package with which we were built.
|
|
- @ExternConfig@
|
|
-endif ()
|
|
+find_package(LAPACK REQUIRED)
|
|
|
|
# Load targets from the install tree.
|
|
-include(${_SuiteSparse_SELF_DIR}/SuiteSparse-targets.cmake)
|
|
+include(${_SuiteSparse_SELF_DIR}/suitesparse-targets.cmake)
|
|
|
|
# Report SuiteSparse header search locations.
|
|
set(SuiteSparse_INCLUDE_DIRS ${_SuiteSparse_PREFIX}/include)
|
|
@@ -31,6 +28,11 @@ set(SuiteSparse_LIBRARIES
|
|
SuiteSparse::spqr
|
|
@SuiteSparse_EXPORTED_METIS_LIBS@
|
|
)
|
|
+set(SUITESPARSE_LIBRARIES ${SuiteSparse_LIBRARIES})
|
|
|
|
unset(_SuiteSparse_PREFIX)
|
|
unset(_SuiteSparse_SELF_DIR)
|
|
+
|
|
+set(SUITESPARSE_FOUND TRUE)
|
|
+set(SuiteSparse_FOUND TRUE)
|
|
+
|