Skip to content

Commit

Permalink
hicspare as separte target
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Nov 22, 2024
1 parent 191aea3 commit 39fdc39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions hic/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ ecbuild_add_library( TARGET hic
$<INSTALL_INTERFACE:include>
)

ecbuild_add_library( TARGET hicsparse
TYPE INTERFACE
PUBLIC_INCLUDES
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src>
$<INSTALL_INTERFACE:include>
)

install( FILES ${PROJECT_BINARY_DIR}/src/hic/hic_config.h DESTINATION include/hic )
install( FILES hic/hic.h DESTINATION include/hic )
install( FILES hic/hic_runtime.h DESTINATION include/hic )
Expand All @@ -39,8 +47,8 @@ install( FILES hic/hic_dummy/hicsparse_dummy.h DESTINATION include/hi

if( HAVE_CUDA )
target_link_libraries( hic INTERFACE CUDA::cudart )
target_link_libraries( hic INTERFACE CUDA::cusparse )
target_link_libraries( hicsparse INTERFACE hic CUDA::cusparse )
elseif( HAVE_HIP )
target_link_libraries( hic INTERFACE hip::host )
target_link_libraries( hic INTERFACE roc::hipsparse )
target_link_libraries( hicsparse INTERFACE hic roc::hipsparse )
endif()
2 changes: 1 addition & 1 deletion hic/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if( HAVE_HIP OR HAVE_CUDA )

ecbuild_add_test( TARGET hic_test_hicsparse
SOURCES test_hicsparse.cc
LIBS hic
LIBS hicsparse
)
endif()

Expand Down

0 comments on commit 39fdc39

Please sign in to comment.