mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:39:08 +08:00
248 lines
9.6 KiB
Diff
248 lines
9.6 KiB
Diff
--- a/cmake/FindSuiteSparse.cmake Mon Dec 05 18:42:48 2016
|
|
+++ b/cmake/FindSuiteSparse.cmake Fri Jul 07 01:50:54 2017
|
|
@@ -179,8 +179,6 @@
|
|
/opt/local/include/ufsparse # Mac OS X
|
|
/usr/local/homebrew/include # Mac OS X
|
|
/usr/local/include
|
|
- /usr/local/include/suitesparse
|
|
- /usr/include/suitesparse # Ubuntu
|
|
/usr/include)
|
|
list(APPEND SUITESPARSE_CHECK_LIBRARY_DIRS
|
|
${SUITESPARSE_LIBRARY_DIR_HINTS}
|
|
@@ -188,9 +186,10 @@
|
|
/opt/local/lib/ufsparse # Mac OS X
|
|
/usr/local/homebrew/lib # Mac OS X
|
|
/usr/local/lib
|
|
- /usr/local/lib/suitesparse
|
|
- /usr/lib/suitesparse # Ubuntu
|
|
/usr/lib)
|
|
+# Additional suffixes to try appending to each search path.
|
|
+list(APPEND SUITESPARSE_CHECK_PATH_SUFFIXES
|
|
+ suitesparse) # Windows/Ubuntu
|
|
|
|
# Given the number of components of SuiteSparse, and to ensure that the
|
|
# automatic failure message generated by FindPackageHandleStandardArgs()
|
|
@@ -218,7 +217,8 @@
|
|
set(AMD_FOUND TRUE)
|
|
list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS AMD_FOUND)
|
|
find_library(AMD_LIBRARY NAMES amd
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${AMD_LIBRARY})
|
|
message(STATUS "Found AMD library: ${AMD_LIBRARY}")
|
|
else (EXISTS ${AMD_LIBRARY})
|
|
@@ -229,7 +229,8 @@
|
|
mark_as_advanced(AMD_LIBRARY)
|
|
|
|
find_path(AMD_INCLUDE_DIR NAMES amd.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${AMD_INCLUDE_DIR})
|
|
message(STATUS "Found AMD header in: ${AMD_INCLUDE_DIR}")
|
|
else (EXISTS ${AMD_INCLUDE_DIR})
|
|
@@ -243,7 +244,8 @@
|
|
set(CAMD_FOUND TRUE)
|
|
list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CAMD_FOUND)
|
|
find_library(CAMD_LIBRARY NAMES camd
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${CAMD_LIBRARY})
|
|
message(STATUS "Found CAMD library: ${CAMD_LIBRARY}")
|
|
else (EXISTS ${CAMD_LIBRARY})
|
|
@@ -254,7 +256,8 @@
|
|
mark_as_advanced(CAMD_LIBRARY)
|
|
|
|
find_path(CAMD_INCLUDE_DIR NAMES camd.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${CAMD_INCLUDE_DIR})
|
|
message(STATUS "Found CAMD header in: ${CAMD_INCLUDE_DIR}")
|
|
else (EXISTS ${CAMD_INCLUDE_DIR})
|
|
@@ -268,7 +271,8 @@
|
|
set(COLAMD_FOUND TRUE)
|
|
list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS COLAMD_FOUND)
|
|
find_library(COLAMD_LIBRARY NAMES colamd
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${COLAMD_LIBRARY})
|
|
message(STATUS "Found COLAMD library: ${COLAMD_LIBRARY}")
|
|
else (EXISTS ${COLAMD_LIBRARY})
|
|
@@ -279,7 +283,8 @@
|
|
mark_as_advanced(COLAMD_LIBRARY)
|
|
|
|
find_path(COLAMD_INCLUDE_DIR NAMES colamd.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${COLAMD_INCLUDE_DIR})
|
|
message(STATUS "Found COLAMD header in: ${COLAMD_INCLUDE_DIR}")
|
|
else (EXISTS ${COLAMD_INCLUDE_DIR})
|
|
@@ -293,7 +298,8 @@
|
|
set(CCOLAMD_FOUND TRUE)
|
|
list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CCOLAMD_FOUND)
|
|
find_library(CCOLAMD_LIBRARY NAMES ccolamd
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${CCOLAMD_LIBRARY})
|
|
message(STATUS "Found CCOLAMD library: ${CCOLAMD_LIBRARY}")
|
|
else (EXISTS ${CCOLAMD_LIBRARY})
|
|
@@ -304,7 +310,8 @@
|
|
mark_as_advanced(CCOLAMD_LIBRARY)
|
|
|
|
find_path(CCOLAMD_INCLUDE_DIR NAMES ccolamd.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${CCOLAMD_INCLUDE_DIR})
|
|
message(STATUS "Found CCOLAMD header in: ${CCOLAMD_INCLUDE_DIR}")
|
|
else (EXISTS ${CCOLAMD_INCLUDE_DIR})
|
|
@@ -318,7 +325,8 @@
|
|
set(CHOLMOD_FOUND TRUE)
|
|
list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CHOLMOD_FOUND)
|
|
find_library(CHOLMOD_LIBRARY NAMES cholmod
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${CHOLMOD_LIBRARY})
|
|
message(STATUS "Found CHOLMOD library: ${CHOLMOD_LIBRARY}")
|
|
else (EXISTS ${CHOLMOD_LIBRARY})
|
|
@@ -329,7 +337,8 @@
|
|
mark_as_advanced(CHOLMOD_LIBRARY)
|
|
|
|
find_path(CHOLMOD_INCLUDE_DIR NAMES cholmod.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${CHOLMOD_INCLUDE_DIR})
|
|
message(STATUS "Found CHOLMOD header in: ${CHOLMOD_INCLUDE_DIR}")
|
|
else (EXISTS ${CHOLMOD_INCLUDE_DIR})
|
|
@@ -343,7 +352,8 @@
|
|
set(SUITESPARSEQR_FOUND TRUE)
|
|
list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS SUITESPARSEQR_FOUND)
|
|
find_library(SUITESPARSEQR_LIBRARY NAMES spqr
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${SUITESPARSEQR_LIBRARY})
|
|
message(STATUS "Found SuiteSparseQR library: ${SUITESPARSEQR_LIBRARY}")
|
|
else (EXISTS ${SUITESPARSEQR_LIBRARY})
|
|
@@ -354,7 +364,8 @@
|
|
mark_as_advanced(SUITESPARSEQR_LIBRARY)
|
|
|
|
find_path(SUITESPARSEQR_INCLUDE_DIR NAMES SuiteSparseQR.hpp
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${SUITESPARSEQR_INCLUDE_DIR})
|
|
message(STATUS "Found SuiteSparseQR header in: ${SUITESPARSEQR_INCLUDE_DIR}")
|
|
else (EXISTS ${SUITESPARSEQR_INCLUDE_DIR})
|
|
@@ -370,7 +381,8 @@
|
|
# support for it, this will do no harm if it wasn't.
|
|
set(TBB_FOUND TRUE)
|
|
find_library(TBB_LIBRARIES NAMES tbb
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${TBB_LIBRARIES})
|
|
message(STATUS "Found Intel Thread Building Blocks (TBB) library: "
|
|
"${TBB_LIBRARIES}, assuming SuiteSparseQR was compiled with TBB.")
|
|
@@ -383,7 +395,8 @@
|
|
|
|
if (TBB_FOUND)
|
|
find_library(TBB_MALLOC_LIB NAMES tbbmalloc
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${TBB_MALLOC_LIB})
|
|
message(STATUS "Found Intel Thread Building Blocks (TBB) Malloc library: "
|
|
"${TBB_MALLOC_LIB}")
|
|
@@ -413,7 +426,8 @@
|
|
# If SuiteSparse version is >= 4 then SuiteSparse_config is required.
|
|
# For SuiteSparse 3, UFconfig.h is required.
|
|
find_library(SUITESPARSE_CONFIG_LIBRARY NAMES suitesparseconfig
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${SUITESPARSE_CONFIG_LIBRARY})
|
|
message(STATUS "Found SuiteSparse_config library: "
|
|
"${SUITESPARSE_CONFIG_LIBRARY}")
|
|
@@ -421,7 +435,8 @@
|
|
mark_as_advanced(SUITESPARSE_CONFIG_LIBRARY)
|
|
|
|
find_path(SUITESPARSE_CONFIG_INCLUDE_DIR NAMES SuiteSparse_config.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${SUITESPARSE_CONFIG_INCLUDE_DIR})
|
|
message(STATUS "Found SuiteSparse_config header in: "
|
|
"${SUITESPARSE_CONFIG_INCLUDE_DIR}")
|
|
@@ -439,7 +454,8 @@
|
|
# does not have librt).
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR UNIX AND NOT APPLE)
|
|
find_library(LIBRT_LIBRARY NAMES rt
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (LIBRT_LIBRARY)
|
|
message(STATUS "Adding librt: ${LIBRT_LIBRARY} to "
|
|
"SuiteSparse_config libraries (required on Linux & Unix [not OSX] if "
|
|
@@ -458,7 +474,8 @@
|
|
# UFconfig header which should be present in < v4 installs.
|
|
set(SUITESPARSE_CONFIG_FOUND FALSE)
|
|
find_path(UFCONFIG_INCLUDE_DIR NAMES UFconfig.h
|
|
- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${UFCONFIG_INCLUDE_DIR})
|
|
message(STATUS "Found UFconfig header in: ${UFCONFIG_INCLUDE_DIR}")
|
|
set(UFCONFIG_FOUND TRUE)
|
|
@@ -549,7 +566,8 @@
|
|
|
|
# METIS (Optional dependency).
|
|
find_library(METIS_LIBRARY NAMES metis
|
|
- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
|
|
+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES})
|
|
if (EXISTS ${METIS_LIBRARY})
|
|
message(STATUS "Found METIS library: ${METIS_LIBRARY}.")
|
|
set(METIS_FOUND TRUE)
|
|
--- a/cmake/FindCXSparse.cmake Mon Dec 05 18:42:48 2016
|
|
+++ b/cmake/FindCXSparse.cmake Fri Jul 07 01:50:04 2017
|
|
@@ -135,12 +135,16 @@
|
|
/usr/local/homebrew/lib # Mac OS X.
|
|
/opt/local/lib
|
|
/usr/lib)
|
|
+# Additional suffixes to try appending to each search path.
|
|
+list(APPEND CXSPARSE_CHECK_PATH_SUFFIXES
|
|
+ suitesparse) # Linux/Windows
|
|
|
|
# Search supplied hint directories first if supplied.
|
|
find_path(CXSPARSE_INCLUDE_DIR
|
|
NAMES cs.h
|
|
- PATHS ${CXSPARSE_INCLUDE_DIR_HINTS}
|
|
- ${CXSPARSE_CHECK_INCLUDE_DIRS})
|
|
+ HINTS ${CXSPARSE_INCLUDE_DIR_HINTS}
|
|
+ PATHS ${CXSPARSE_CHECK_INCLUDE_DIRS}
|
|
+ PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES})
|
|
if (NOT CXSPARSE_INCLUDE_DIR OR
|
|
NOT EXISTS ${CXSPARSE_INCLUDE_DIR})
|
|
cxsparse_report_not_found(
|
|
@@ -150,8 +154,9 @@
|
|
NOT EXISTS ${CXSPARSE_INCLUDE_DIR})
|
|
|
|
find_library(CXSPARSE_LIBRARY NAMES cxsparse
|
|
- PATHS ${CXSPARSE_LIBRARY_DIR_HINTS}
|
|
- ${CXSPARSE_CHECK_LIBRARY_DIRS})
|
|
+ HINTS ${CXSPARSE_LIBRARY_DIR_HINTS}
|
|
+ PATHS ${CXSPARSE_CHECK_LIBRARY_DIRS}
|
|
+ PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES})
|
|
if (NOT CXSPARSE_LIBRARY OR
|
|
NOT EXISTS ${CXSPARSE_LIBRARY})
|
|
cxsparse_report_not_found(
|