diff options
author | Brad King <brad.king@kitware.com> | 2023-07-07 14:27:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-07-07 14:27:18 (GMT) |
commit | c8683029f315b0635a2384dcbb676f706c279ceb (patch) | |
tree | 0aab0ae284c5a429729d9f686c911a56f75ef2de | |
parent | b384058e4ba77defdff8741db636f60d6843d87d (diff) | |
parent | f79428619e284e0b6ee17cbf81dcbef25d3a8b29 (diff) | |
download | CMake-c8683029f315b0635a2384dcbb676f706c279ceb.zip CMake-c8683029f315b0635a2384dcbb676f706c279ceb.tar.gz CMake-c8683029f315b0635a2384dcbb676f706c279ceb.tar.bz2 |
Merge topic 'hip-lib64' into release-3.27
f79428619e HIP: Fix search for hip-lang CMake package on Fedora distros
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8614
-rw-r--r-- | Modules/CMakeDetermineHIPCompiler.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineHIPCompiler.cmake b/Modules/CMakeDetermineHIPCompiler.cmake index 5e54502..9a40e82 100644 --- a/Modules/CMakeDetermineHIPCompiler.cmake +++ b/Modules/CMakeDetermineHIPCompiler.cmake @@ -124,7 +124,10 @@ unset(_CMAKE_HIP_COMPILER_ID_IMPLICIT_FWKS) unset(_CMAKE_HIP_COMPILER_ID_IMPLICIT_LOG) if(NOT CMAKE_HIP_COMPILER_ROCM_LIB) - set(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib") + set(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS + "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib" + "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib64" + ) if(CMAKE_HIP_LIBRARY_ARCHITECTURE) list(APPEND _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/${CMAKE_HIP_LIBRARY_ARCHITECTURE}") endif() @@ -146,6 +149,12 @@ if(NOT CMAKE_HIP_COMPILER_ROCM_LIB) endif() unset(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS) endif() +if(CMAKE_HIP_COMPILER_ROCM_LIB MATCHES "/lib64$" AND NOT DEFINED CMAKE_SIZEOF_VOID_P) + # We have not yet determined the target ABI but we need 'find_package' to + # search lib64 directories to find hip-lang CMake package dependencies. + # This will be replaced by ABI detection later. + set(CMAKE_HIP_SIZEOF_DATA_PTR 8) +endif() if (NOT _CMAKE_TOOLCHAIN_LOCATION) get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_HIP_COMPILER}" PATH) |