Skip to content

Commit

Permalink
Merge pull request #661 from mmuetzel/spqr
Browse files Browse the repository at this point in the history
SPQR: Fixes for pkg-config files
  • Loading branch information
DrTimothyAldenDavis authored Dec 30, 2023
2 parents f045d0f + b41b35f commit 71bbdb0
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions SPQR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ if ( SPQR_HAS_CUDA )
if ( BUILD_STATIC_LIBS )
target_link_libraries ( SPQR_static PRIVATE GPUQREngine_static GPURuntime_static )
target_compile_definitions ( SPQR_static PUBLIC "SPQR_HAS_CUDA" )
set ( SPQR_STATIC_MODULES "${SPQR_STATIC_MODULES} GPUQREngine SuiteSparse_GPURuntime" )
endif ( )
add_subdirectory ( SPQRGPU )
else ( )
Expand Down
2 changes: 1 addition & 1 deletion SPQR/Config/SPQR.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name: SPQR
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Multithreaded, multifrontal, rank-revealing sparse QR factorization method in SuiteSparse
Version: @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@.@SPQR_VERSION_SUB@
Requires.private: SuiteSparse_config CHOLMOD
Requires.private: SuiteSparse_config CHOLMOD @SPQR_STATIC_MODULES@
Libs: -L${libdir} -l@SUITESPARSE_LIB_BASE_NAME@
Libs.private: @SPQR_STATIC_LIBS@
Cflags: -I${includedir} @SPQR_CFLAGS@
11 changes: 10 additions & 1 deletion SPQR/GPUQREngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,20 @@ if ( NOT MSVC )
else ( )
set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}")
endif ( )
if ( BUILD_SHARED_LIBS )
set ( SUITESPARSE_LIB_BASE_NAME $<TARGET_FILE_BASE_NAME:GPUQREngine> )
else ( )
set ( SUITESPARSE_LIB_BASE_NAME $<TARGET_FILE_BASE_NAME:GPUQREngine_static> )
endif ( )
configure_file (
Config/GPUQREngine.pc.in
GPUQREngine.pc
GPUQREngine.pc.out
@ONLY
NEWLINE_STYLE LF )
file ( GENERATE
OUTPUT GPUQREngine.pc
INPUT ${CMAKE_CURRENT_BINARY_DIR}/GPUQREngine.pc.out
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/GPUQREngine.pc
DESTINATION ${SUITESPARSE_PKGFILEDIR}/pkgconfig )
Expand Down
2 changes: 1 addition & 1 deletion SPQR/GPUQREngine/Config/GPUQREngine.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Name: GPUQREngine
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: GPU-accelerated QR factorization engine supporting SuiteSparseQR in SuiteSparse
Version: @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@.@SPQR_VERSION_SUB@
Libs: -L${libdir} -lgpuqrengine@CMAKE_RELEASE_POSTFIX@
Libs: -L${libdir} -l@SUITESPARSE_LIB_BASE_NAME@
Cflags: -I${includedir}
13 changes: 11 additions & 2 deletions SPQR/GPURuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ message ( STATUS "Building SPQR/GPURUNTIME version: v"

project ( suitesparse_gpuruntime
VERSION "${SPQR_VERSION_MAJOR}.${SPQR_VERSION_MINOR}.${SPQR_VERSION_SUB}"
LANGUAGES C CXX CUDA )
LANGUAGES CXX )

#-------------------------------------------------------------------------------
# SuiteSparse policies
Expand Down Expand Up @@ -190,11 +190,20 @@ if ( NOT MSVC )
else ( )
set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}")
endif ( )
if ( BUILD_SHARED_LIBS )
set ( SUITESPARSE_LIB_BASE_NAME $<TARGET_FILE_BASE_NAME:GPURuntime> )
else ( )
set ( SUITESPARSE_LIB_BASE_NAME $<TARGET_FILE_BASE_NAME:GPURuntime_static> )
endif ( )
configure_file (
Config/SuiteSparse_GPURuntime.pc.in
SuiteSparse_GPURuntime.pc
SuiteSparse_GPURuntime.pc.out
@ONLY
NEWLINE_STYLE LF )
file ( GENERATE
OUTPUT SuiteSparse_GPURuntime.pc
INPUT ${CMAKE_CURRENT_BINARY_DIR}/SuiteSparse_GPURuntime.pc.out
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/SuiteSparse_GPURuntime.pc
DESTINATION ${SUITESPARSE_PKGFILEDIR}/pkgconfig )
Expand Down
2 changes: 1 addition & 1 deletion SPQR/GPURuntime/Config/SuiteSparse_GPURuntime.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Helper functions for the GPU in SuiteSparse
Version: @SPQR_VERSION_MAJOR@.@SPQR_VERSION_MINOR@.@SPQR_VERSION_SUB@
Requires.private: SuiteSparse_config
Libs: -L${libdir} -lsuitesparse_gpuruntime@CMAKE_RELEASE_POSTFIX@
Libs: -L${libdir} -l@SUITESPARSE_LIB_BASE_NAME@
Cflags: -I${includedir}

0 comments on commit 71bbdb0

Please sign in to comment.