Skip to content

Commit

Permalink
Edit EP file to make it use CMake.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstoup committed Apr 13, 2021
1 parent 3de9b6f commit 0e6e761
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMake/External_SuiteSparse.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ elseif (NOT WIN32 AND NOT BUILD_CXSPARSE_ONLY)
set(SUITESPARSE_BLAS "-framework Accelerate")
endif()

set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${SUITESPARSE_LAPACK} ${SUITESPARSE_BLAS})
find_library(LIBRT_LIBRARY rt)
mark_as_advanced(LIBRT_LIBRARY)
set(SUITESPARSE_LIBRT ${LIBRT_LIBRARY})
Expand All @@ -72,13 +73,12 @@ elseif (NOT WIN32 AND NOT BUILD_CXSPARSE_ONLY)
# Make sure the install directories are created, which is not a guarantee with SuiteSparse built alone (first)
file(MAKE_DIRECTORY ${fletch_BUILD_INSTALL_PREFIX}/include)
file(MAKE_DIRECTORY ${fletch_BUILD_INSTALL_PREFIX}/lib)
Fletch_Require_Make()
ExternalProject_Add(SuiteSparse
DEPENDS ${SuiteSparse_DEPENDS}
URL ${SuiteSparse_file}
URL_MD5 ${SuiteSparse_md5}
${COMMON_EP_ARGS}
BUILD_IN_SOURCE 1
${COMMON_CMAKE_EP_ARGS}
PATCH_COMMAND ${CMAKE_COMMAND}
-DSuiteSparse_patch=${fletch_SOURCE_DIR}/Patches/SuiteSparse
-DSuiteSparse_source=${fletch_BUILD_PREFIX}/src/SuiteSparse
Expand All @@ -89,10 +89,11 @@ elseif (NOT WIN32 AND NOT BUILD_CXSPARSE_ONLY)
-DLIBRT_LIBRARY=${SUITESPARSE_LIBRT}
-DSUITESPARSE_NOTIMER=${SUITESPARSE_NOTIMER}
-P ${fletch_SOURCE_DIR}/Patches/SuiteSparse/Patch.cmake

CONFIGURE_COMMAND ""
BUILD_COMMAND ${MAKE_EXECUTABLE} -j1
INSTALL_COMMAND ${MAKE_EXECUTABLE} install
CMAKE_ARGS
${COMMON_CMAKE_ARGS}
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DSuiteSparse_LINKER_LAPACK_BLAS_LIBS=${SuiteSparse_LINKER_LAPACK_BLAS_LIBS}
-DHAVE_COMPLEX:BOOL=ON
)

endif()
Expand Down

0 comments on commit 0e6e761

Please sign in to comment.