diff options
author | Brad King <brad.king@kitware.com> | 2022-11-10 15:03:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-10 15:04:01 (GMT) |
commit | 8dc7f6a4434ea8018272d6af4b3f096de4d682dc (patch) | |
tree | 1adc4349f91088b53682af1eadc6c3df69ae32ae | |
parent | 6f4cffa5b712b5b296316bcae1b503d13f85d262 (diff) | |
parent | 6f707ab541c92a4c53f06553963474a1ede98a62 (diff) | |
download | CMake-8dc7f6a4434ea8018272d6af4b3f096de4d682dc.zip CMake-8dc7f6a4434ea8018272d6af4b3f096de4d682dc.tar.gz CMake-8dc7f6a4434ea8018272d6af4b3f096de4d682dc.tar.bz2 |
Merge topic 'find_cuda_toolkit_support_symlink_math_dirs'
6f707ab541 FindCUDAToolkit: Support math_libs directory being a symlink
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7893
-rw-r--r-- | Modules/FindCUDAToolkit.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index 94c86e9..365b72a 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -834,8 +834,8 @@ endif() # The NVHPC layout moves math library headers and libraries to a sibling directory. # Create a separate variable so this directory can be selectively added to math targets. if(NOT EXISTS "${CUDAToolkit_INCLUDE_DIR}/cublas_v2.h") - set(CUDAToolkit_MATH_INCLUDE_DIR "${CUDAToolkit_TARGET_DIR}/../../math_libs/include") - cmake_path(NORMAL_PATH CUDAToolkit_MATH_INCLUDE_DIR) + file(REAL_PATH "${CUDAToolkit_TARGET_DIR}/../../" CUDAToolkit_MATH_INCLUDE_DIR) + cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "math_libs/include") if(NOT EXISTS "${CUDAToolkit_MATH_INCLUDE_DIR}/cublas_v2.h") if(NOT CUDAToolkit_FIND_QUIETLY) message(STATUS "Unable to find cublas_v2.h in either \"${CUDAToolkit_INCLUDE_DIR}\" or \"${CUDAToolkit_MATH_INCLUDE_DIR}\"") |