Skip to content

Commit 0e6e761

Browse files
committed
Edit EP file to make it use CMake.
1 parent 3de9b6f commit 0e6e761

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

CMake/External_SuiteSparse.cmake

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ elseif (NOT WIN32 AND NOT BUILD_CXSPARSE_ONLY)
6060
set(SUITESPARSE_BLAS "-framework Accelerate")
6161
endif()
6262

63+
set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${SUITESPARSE_LAPACK} ${SUITESPARSE_BLAS})
6364
find_library(LIBRT_LIBRARY rt)
6465
mark_as_advanced(LIBRT_LIBRARY)
6566
set(SUITESPARSE_LIBRT ${LIBRT_LIBRARY})
@@ -72,13 +73,12 @@ elseif (NOT WIN32 AND NOT BUILD_CXSPARSE_ONLY)
7273
# Make sure the install directories are created, which is not a guarantee with SuiteSparse built alone (first)
7374
file(MAKE_DIRECTORY ${fletch_BUILD_INSTALL_PREFIX}/include)
7475
file(MAKE_DIRECTORY ${fletch_BUILD_INSTALL_PREFIX}/lib)
75-
Fletch_Require_Make()
7676
ExternalProject_Add(SuiteSparse
7777
DEPENDS ${SuiteSparse_DEPENDS}
7878
URL ${SuiteSparse_file}
7979
URL_MD5 ${SuiteSparse_md5}
8080
${COMMON_EP_ARGS}
81-
BUILD_IN_SOURCE 1
81+
${COMMON_CMAKE_EP_ARGS}
8282
PATCH_COMMAND ${CMAKE_COMMAND}
8383
-DSuiteSparse_patch=${fletch_SOURCE_DIR}/Patches/SuiteSparse
8484
-DSuiteSparse_source=${fletch_BUILD_PREFIX}/src/SuiteSparse
@@ -89,10 +89,11 @@ elseif (NOT WIN32 AND NOT BUILD_CXSPARSE_ONLY)
8989
-DLIBRT_LIBRARY=${SUITESPARSE_LIBRT}
9090
-DSUITESPARSE_NOTIMER=${SUITESPARSE_NOTIMER}
9191
-P ${fletch_SOURCE_DIR}/Patches/SuiteSparse/Patch.cmake
92-
93-
CONFIGURE_COMMAND ""
94-
BUILD_COMMAND ${MAKE_EXECUTABLE} -j1
95-
INSTALL_COMMAND ${MAKE_EXECUTABLE} install
92+
CMAKE_ARGS
93+
${COMMON_CMAKE_ARGS}
94+
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
95+
-DSuiteSparse_LINKER_LAPACK_BLAS_LIBS=${SuiteSparse_LINKER_LAPACK_BLAS_LIBS}
96+
-DHAVE_COMPLEX:BOOL=ON
9697
)
9798

9899
endif()

0 commit comments

Comments
 (0)