Skip to content

Commit 320e003

Browse files
committed
Merge branch 'main' into release/hip6.0_cuda12.2
2 parents aed0db8 + 58db9c1 commit 320e003

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Orochi/enable_cuew.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ endfunction()
3232
# Function to check if a path is valid
3333
function(path_ok result inPath)
3434
if(EXISTS "${inPath}" AND IS_DIRECTORY "${inPath}")
35-
set(${result} TRUE)
35+
set(${result} TRUE PARENT_SCOPE)
3636
else()
37-
set(${result} FALSE)
37+
set(${result} FALSE PARENT_SCOPE)
3838
endif()
3939
endfunction()
4040

@@ -55,13 +55,15 @@ if(DEFINED ENV{${BEST_CUDA_ENVVAR}})
5555
set(cuda_path $ENV{${BEST_CUDA_ENVVAR}})
5656
endif()
5757

58+
# if not found in envvar, try if path exist ( linux )
5859
if(NOT cuda_path)
5960
path_ok(cuda_path_ok ${BEST_CUDA_PATH_LINUX})
6061
if(cuda_path_ok)
6162
set(cuda_path ${BEST_CUDA_PATH_LINUX})
6263
endif()
6364
endif()
6465

66+
# try the windows path
6567
if(NOT cuda_path)
6668
path_ok(cuda_path_ok ${BEST_CUDA_PATH_WINDOWS})
6769
if(cuda_path_ok)

0 commit comments

Comments
 (0)