File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ endfunction()
32
32
# Function to check if a path is valid
33
33
function (path_ok result inPath )
34
34
if (EXISTS "${inPath} " AND IS_DIRECTORY "${inPath} " )
35
- set (${result} TRUE )
35
+ set (${result} TRUE PARENT_SCOPE )
36
36
else ()
37
- set (${result} FALSE )
37
+ set (${result} FALSE PARENT_SCOPE )
38
38
endif ()
39
39
endfunction ()
40
40
@@ -55,13 +55,15 @@ if(DEFINED ENV{${BEST_CUDA_ENVVAR}})
55
55
set (cuda_path $ENV{${BEST_CUDA_ENVVAR}} )
56
56
endif ()
57
57
58
+ # if not found in envvar, try if path exist ( linux )
58
59
if (NOT cuda_path )
59
60
path_ok (cuda_path_ok ${BEST_CUDA_PATH_LINUX} )
60
61
if (cuda_path_ok )
61
62
set (cuda_path ${BEST_CUDA_PATH_LINUX} )
62
63
endif ()
63
64
endif ()
64
65
66
+ # try the windows path
65
67
if (NOT cuda_path )
66
68
path_ok (cuda_path_ok ${BEST_CUDA_PATH_WINDOWS} )
67
69
if (cuda_path_ok )
You can’t perform that action at this time.
0 commit comments