Skip to content

Commit

Permalink
KLU: Don't explicitly link to transient targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Aug 29, 2023
1 parent 20695c1 commit bc42e40
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions KLU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,43 +296,20 @@ if ( NOT NCHOLMOD )

# CHOLMOD:
# link with CHOLMOD and its dependencies, both required and optional

if ( SUITESPARSE_CUDA )

# CHOLMOD with CUDA
target_link_libraries ( KLU PRIVATE
SuiteSparse::CHOLMOD SuiteSparse::CHOLMOD_CUDA )
target_link_libraries ( KLU_CHOLMOD PRIVATE
SuiteSparse::CHOLMOD SuiteSparse::CHOLMOD_CUDA )
if ( NOT NSTATIC )
set ( KLU_STATIC_MODULES "${KLU_STATIC_MODULES} CHOLMOD CHOLMOD_CUDA" )
if ( TARGET SuiteSparse::CHOLMOD_static )
target_link_libraries ( KLU_static PUBLIC SuiteSparse::CHOLMOD_static )
target_link_libraries ( KLU_CHOLMOD_static PUBLIC SuiteSparse::CHOLMOD_static )
else ( )
target_link_libraries ( KLU_static PUBLIC SuiteSparse::CHOLMOD )
target_link_libraries ( KLU_CHOLMOD_static PUBLIC SuiteSparse::CHOLMOD )
endif ( )
endif ( )

else ( )

# CHOLMOD without CUDA
target_link_libraries ( KLU PRIVATE
SuiteSparse::CHOLMOD )
target_link_libraries ( KLU_CHOLMOD PRIVATE
SuiteSparse::CHOLMOD )
if ( NOT NSTATIC )
set ( KLU_STATIC_MODULES "${KLU_STATIC_MODULES} CHOLMOD" )
if ( TARGET SuiteSparse::CHOLMOD_static )
target_link_libraries ( KLU_static PUBLIC SuiteSparse::CHOLMOD_static )
target_link_libraries ( KLU_CHOLMOD_static PUBLIC SuiteSparse::CHOLMOD_static )
else ( )
target_link_libraries ( KLU_static PUBLIC SuiteSparse::CHOLMOD )
target_link_libraries ( KLU_CHOLMOD_static PUBLIC SuiteSparse::CHOLMOD )
endif ( )
# CHOLMOD without CUDA
target_link_libraries ( KLU PRIVATE
SuiteSparse::CHOLMOD )
target_link_libraries ( KLU_CHOLMOD PRIVATE
SuiteSparse::CHOLMOD )
if ( NOT NSTATIC )
set ( KLU_STATIC_MODULES "${KLU_STATIC_MODULES} CHOLMOD" )
if ( TARGET SuiteSparse::CHOLMOD_static )
target_link_libraries ( KLU_static PUBLIC SuiteSparse::CHOLMOD_static )
target_link_libraries ( KLU_CHOLMOD_static PUBLIC SuiteSparse::CHOLMOD_static )
else ( )
target_link_libraries ( KLU_static PUBLIC SuiteSparse::CHOLMOD )
target_link_libraries ( KLU_CHOLMOD_static PUBLIC SuiteSparse::CHOLMOD )
endif ( )

endif ( )

# klu:
Expand Down

0 comments on commit bc42e40

Please sign in to comment.