summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDAToolkit.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindCUDAToolkit.cmake')
-rw-r--r--Modules/FindCUDAToolkit.cmake4
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}\"")