From 36cd25551df8dbff2b2dc52a77fdc031a4a70942 Mon Sep 17 00:00:00 2001 From: erw Date: Wed, 22 Jul 2015 16:53:54 -0700 Subject: [PATCH] Fix a minor bug for buildinfo.h when CUDA_PATH is not defined --- MachineLearning/CNTK/prebuild.bat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MachineLearning/CNTK/prebuild.bat b/MachineLearning/CNTK/prebuild.bat index 0af9f3653..1b9c0a3bf 100644 --- a/MachineLearning/CNTK/prebuild.bat +++ b/MachineLearning/CNTK/prebuild.bat @@ -27,8 +27,11 @@ set a=%~dp0 set buildpath="%a:\=\\%" echo #define _BUILDPATH_ %buildpath% >> buildinfo.h$$ -set cuda_path="%CUDA_PATH:\=\\%" -echo #define _CUDA_PATH_ %cuda_path% >> buildinfo.h$$ +if "%cuda_path%" == "" ( + echo #define _CUDA_PATH_ "NOT_DEFINED" >> buildinfo.h$$ + ) else ( + echo #define _CUDA_PATH_ "%cuda_path:\=\\%" >> buildinfo.h$$ + ) echo #endif >> buildinfo.h$$