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

fixing empty packages #507

Merged
merged 2 commits into from
Aug 16, 2024
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
39 changes: 7 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,42 +147,17 @@ if(BUILD_CLIENTS_SAMPLES OR BUILD_CLIENTS_TESTS OR BUILD_CLIENTS_BENCHMARKS)
set(GFORTRAN_RPM "gfortran")
endif()

rocm_package_setup_component(clients)
rocm_package_setup_client_component(clients-common)
if(BUILD_CLIENTS_TESTS)
rocm_package_setup_client_component(
tests
DEPENDS
COMPONENT clients-common
DEB "${GFORTRAN_DEB}"
RPM "${GFORTRAN_RPM}")
rocm_package_setup_client_component(
tests
DEPENDS
COMPONENT clients-common
DEB "${OPENMP_DEB}"
RPM "${OPENMP_RPM}"
)
endif()
if(BUILD_CLIENTS_SAMPLES)
rocm_package_setup_client_component(
samples
DEPENDS
COMPONENT clients-common
DEB "${GFORTRAN_DEB}"
RPM "${GFORTRAN_RPM}")
rocm_package_setup_client_component(tests)
endif()
# if(BUILD_CLIENTS_SAMPLES)
# rocm_package_setup_client_component(samples)
# endif()

if( BUILD_CLIENTS_BENCHMARKS )
rocm_package_setup_client_component(
benchmarks
DEPENDS
COMPONENT clients-common
DEB "${OPENMP_DEB}"
RPM "${OPENMP_RPM}"
)
if(BUILD_CLIENTS_BENCHMARKS)
rocm_package_setup_client_component(benchmarks)
endif()

add_subdirectory( clients )

if(NOT WIN32)
Expand Down
43 changes: 22 additions & 21 deletions clients/samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(HIPSPARSE_CLIENTS_COMMON ../common/utility.cpp)
# Function to add hipsparse examples
function(add_hipsparse_example EXAMPLE_SOURCE)
get_filename_component(EXAMPLE_TARGET ${EXAMPLE_SOURCE} NAME_WE)
list(TRANSFORM EXAMPLE_TARGET PREPEND "hipsparse-")
add_executable(${EXAMPLE_TARGET} ${EXAMPLE_SOURCE} ${HIPSPARSE_CLIENTS_COMMON})

get_filename_component(EXAMPLE_EXTENSION ${EXAMPLE_SOURCE} LAST_EXT)
Expand All @@ -49,34 +50,34 @@ function(add_hipsparse_example EXAMPLE_SOURCE)
endif()

set_target_properties(${EXAMPLE_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging")

rocm_install(TARGETS ${EXAMPLE_TARGET} COMPONENT samples)
endfunction()

# Examples
add_hipsparse_example(example_handle.cpp)

if(NOT USE_CUDA OR (USE_CUDA AND CUDA_VERSION LESS 11))
add_hipsparse_example(example_csrmv.cpp)
add_hipsparse_example(example_hybmv.cpp)
add_hipsparse_example(example_csrmv.cpp)
add_hipsparse_example(example_hybmv.cpp)
endif()

if (NOT WIN32)
# Fortran examples
if(TARGET hipsparse AND NOT USE_CUDA)
# Compile Fortran examples only if built directly with package
# else the Fortran module file is not generated


add_hipsparse_example(example_fortran_auxiliary.f90)
add_hipsparse_example(example_fortran_csrsv2.f90)
add_hipsparse_example(example_fortran_bsric02.f90)
add_hipsparse_example(example_fortran_csric02.f90)
add_hipsparse_example(example_fortran_bsrilu02.f90)
add_hipsparse_example(example_fortran_csrilu02.f90)
add_hipsparse_example(example_fortran_csrsm2.f90)
add_hipsparse_example(example_fortran_dotci.f90)
add_hipsparse_example(example_fortran_roti.f90)
add_hipsparse_example(example_fortran_spmv.f90)
add_hipsparse_example(example_fortran_bsrmm.f90)

endif()
# Fortran examples
if(TARGET hipsparse AND NOT USE_CUDA)
# Compile Fortran examples only if built directly with package
# else the Fortran module file is not generated

add_hipsparse_example(example_fortran_auxiliary.f90)
add_hipsparse_example(example_fortran_csrsv2.f90)
add_hipsparse_example(example_fortran_bsric02.f90)
add_hipsparse_example(example_fortran_csric02.f90)
add_hipsparse_example(example_fortran_bsrilu02.f90)
add_hipsparse_example(example_fortran_csrilu02.f90)
add_hipsparse_example(example_fortran_csrsm2.f90)
add_hipsparse_example(example_fortran_dotci.f90)
add_hipsparse_example(example_fortran_roti.f90)
add_hipsparse_example(example_fortran_spmv.f90)
add_hipsparse_example(example_fortran_bsrmm.f90)
endif()
endif()