[HIPIFY] Introduce CUDA installation path option '-cuda-path'

Repeats clang's '--cuda-path' option.

[Reason]
In case of absence of any other clang's options setting '-cuda-path' allows not to specify separator '--' before clang's '--cuda-path'.

+ Tests and scripts are updated accordingly.
Tento commit je obsažen v:
Evgeny Mankov
2019-01-09 20:18:36 +03:00
rodič 0e750d727f
revize fbfe005e4e
45 změnil soubory, kde provedl 64 přidání a 51 odebrání
+5 -4
Zobrazit soubor
@@ -2,17 +2,18 @@
setlocal
for %%i in (FileCheck.exe) do set FILE_CHECK=%%~$PATH:i
if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1)
if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1)
set HIPIFY=%1
set IN_FILE=%2
set TMP_FILE=%3
set CUDA_ROOT=%4
set all_args=%*
call set clang_args=%%all_args:*%4=%%
set clang_args=%4%clang_args%
call set clang_args=%%all_args:*%5=%%
set clang_args=%5%clang_args%
%HIPIFY% -o=%TMP_FILE% %IN_FILE% -- %clang_args%
%HIPIFY% -o=%TMP_FILE% %IN_FILE% %CUDA_ROOT% -- %clang_args%
if errorlevel 1 (echo Error: hipify-clang.exe failed with exit code: %errorlevel% && exit /b %errorlevel%)
findstr /v /r /c:"[ ]*//[ ]*[CHECK*|RUN]" %TMP_FILE% | %FILE_CHECK% %IN_FILE%