Skip to content

Commit

Permalink
Merge branch 'main' into release/hip6.0_cuda12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardGe committed Jun 6, 2024
2 parents aed0db8 + 58db9c1 commit 320e003
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Orochi/enable_cuew.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ endfunction()
# Function to check if a path is valid
function(path_ok result inPath)
if(EXISTS "${inPath}" AND IS_DIRECTORY "${inPath}")
set(${result} TRUE)
set(${result} TRUE PARENT_SCOPE)
else()
set(${result} FALSE)
set(${result} FALSE PARENT_SCOPE)
endif()
endfunction()

Expand All @@ -55,13 +55,15 @@ if(DEFINED ENV{${BEST_CUDA_ENVVAR}})
set(cuda_path $ENV{${BEST_CUDA_ENVVAR}})
endif()

# if not found in envvar, try if path exist ( linux )
if(NOT cuda_path)
path_ok(cuda_path_ok ${BEST_CUDA_PATH_LINUX})
if(cuda_path_ok)
set(cuda_path ${BEST_CUDA_PATH_LINUX})
endif()
endif()

# try the windows path
if(NOT cuda_path)
path_ok(cuda_path_ok ${BEST_CUDA_PATH_WINDOWS})
if(cuda_path_ok)
Expand Down

0 comments on commit 320e003

Please sign in to comment.