diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt index 55040b64b..02a2d0ab4 100644 --- a/clients/benchmarks/CMakeLists.txt +++ b/clients/benchmarks/CMakeLists.txt @@ -231,9 +231,8 @@ if (NOT WIN32) endif() if (NOT WIN32) - if(BUILD_WITH_ROCTX) - find_package(roctx REQUIRED) - target_link_libraries(rocsparse-bench PRIVATE roctx::roctx) + if (BUILD_WITH_ROCTX) + target_link_libraries(rocsparse-bench PRIVATE -lroctx64) target_compile_definitions( rocsparse-bench PRIVATE ROCSPARSE_CLIENTS_WITH_ROCTX ) endif() endif() diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt index 2fe4abca2..d26a10cdf 100644 --- a/clients/tests/CMakeLists.txt +++ b/clients/tests/CMakeLists.txt @@ -415,9 +415,8 @@ if (NOT WIN32) endif() if (NOT WIN32) - if(BUILD_WITH_ROCTX) - find_package(roctx REQUIRED) - target_link_libraries(rocsparse-test PRIVATE roctx::roctx) + if (BUILD_WITH_ROCTX) + target_link_libraries(rocsparse-test PRIVATE -lroctx64) target_compile_definitions( rocsparse-test PRIVATE ROCSPARSE_CLIENTS_WITH_ROCTX ) endif() endif() diff --git a/cmake/Findroctx.cmake b/cmake/Findroctx.cmake deleted file mode 100644 index 33f692161..000000000 --- a/cmake/Findroctx.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# ######################################################################## -# Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell cop- -# ies of the Software, and to permit persons to whom the Software is furnished -# to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM- -# PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNE- -# CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# ######################################################################## - -#[=======================================================================[.rst: -Findroctx ----------- - -Find the roctx library - -Imported targets -^^^^^^^^^^^^^^^^ - -This module defines the :prop_tgt:`IMPORTED` target if roctx is found: - -``roctx::roctx`` - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -``ROCTX_INCLUDE_DIR`` -``ROCTX_LIBRARY`` -``ROCTX_LIBRARIES`` -``ROCTX_FOUND`` - -#]=======================================================================] - -find_path(ROCTX_INCLUDE_DIR - NAMES roctx.h - PATH_SUFFIXES roctracer - ) -find_library(ROCTX_LIBRARY roctx64) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(roctx ROCTX_INCLUDE_DIR ROCTX_LIBRARY) - -if(ROCTX_FOUND) - if(NOT DEFINED ROCTX_LIBRARIES) - set(ROCTX_LIBRARIES ${ROCTX_LIBRARY}) - endif() - - if(NOT TARGET roctx::roctx) - add_library(roctx::roctx UNKNOWN IMPORTED) - - set_target_properties(roctx::roctx PROPERTIES - IMPORTED_LOCATION "${ROCTX_LIBRARY}" - ) - set_target_properties(roctx::roctx PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${ROCTX_INCLUDE_DIR}" - ) - endif() -endif() diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index b363868c7..c52d9a143 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -96,8 +96,7 @@ endif() if (NOT WIN32) if (BUILD_SHARED_LIBS AND BUILD_WITH_ROCTX) - find_package(roctx REQUIRED) - target_link_libraries(rocsparse PRIVATE roctx::roctx) + target_link_libraries(rocsparse PRIVATE -lroctx64) target_compile_definitions( rocsparse PRIVATE ROCSPARSE_BUILT_WITH_ROCTX ) endif() endif()