Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPQR: Fixes for pkg-config files #661

Merged
merged 4 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}