From 58db9c18b952f5148f0e4465a86a66e487d50525 Mon Sep 17 00:00:00 2001 From: Richard Geslot Date: Thu, 6 Jun 2024 23:35:29 +0200 Subject: [PATCH] fix cmake script for CUEW --- Orochi/enable_cuew.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Orochi/enable_cuew.cmake b/Orochi/enable_cuew.cmake index a707bcf..d251abe 100644 --- a/Orochi/enable_cuew.cmake +++ b/Orochi/enable_cuew.cmake @@ -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() @@ -55,6 +55,7 @@ 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) @@ -62,6 +63,7 @@ if(NOT cuda_path) endif() endif() +# try the windows path if(NOT cuda_path) path_ok(cuda_path_ok ${BEST_CUDA_PATH_WINDOWS}) if(cuda_path_ok)