Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vs/CheckOrInstallDeps.bat')
-rw-r--r--vs/CheckOrInstallDeps.bat62
1 files changed, 36 insertions, 26 deletions
diff --git a/vs/CheckOrInstallDeps.bat b/vs/CheckOrInstallDeps.bat
index 2fd1f5b3..65c5e252 100644
--- a/vs/CheckOrInstallDeps.bat
+++ b/vs/CheckOrInstallDeps.bat
@@ -2,7 +2,7 @@
:: Usage: CheckOrInstallDeps.bat
::
:: This script is used to verify that all the dependencies required to build Marian are available.
-:: The Cuda SDK and the Intel MKL must be installed beforehand by the user.
+:: The CUDA SDK and the Intel MKL must be installed beforehand by the user.
:: The rest of libraries (see README.md), if not found, will be installed by this script using
:: vcpkg.
::
@@ -96,6 +96,9 @@ echo.
echo --- Checking dependencies...
set CMAKE_OPT=
+set FOUND_CUDA=
+set FOUND_MKL=
+set FOUND_BOOST=
:: -------------------------
@@ -105,8 +108,9 @@ echo.
echo ... CUDA
if "%CUDA_PATH%"=="" (
echo The CUDA_PATH environment variable is not defined: this will compile only the CPU version.
+ set "FOUND_CUDA=false"
) else (
- echo Found Cuda SDK in %CUDA_PATH%
+ echo Found Cuda SDK in "%CUDA_PATH%"
)
:: -------------------------
@@ -119,26 +123,30 @@ echo ... Intel MKL
if "%MKLROOT%" == "" (
set "MKLROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl"
)
+
if not exist "%MKLROOT%" (
echo MKLROOT is set to a non existing path:
- echo "%MKLROOT%"
+ echo "%MKLROOT%"
echo Please make sure the Intel MKL libraries are installed and set MKLROOT to the installation path.
- exit /b 1
-)
-if not exist "%MKLROOT%\include\mkl_version.h" (
+ set "FOUND_MKL=false"
+) else if not exist "%MKLROOT%\include\mkl_version.h" (
echo MKL header files were not found in this folder:
- echo "%MKLROOT%"
+ echo "%MKLROOT%\include"
echo Please make sure Intel MKL is properly installed.
- exit /b 1
-)
-if not exist "%MKLROOT%\lib\intel64\mkl_core.lib" (
+ set "FOUND_MKL=false"
+) else if not exist "%MKLROOT%\lib\intel64\mkl_core.lib" (
echo MKL library files were not found in this folder:
- echo "%MKLROOT%"
+ echo "%MKLROOT%\lib\intel64"
echo Please make sure Intel MKL is properly installed.
- exit /b 1
+ set "FOUND_MKL=false"
+) else (
+ echo Found Intel MKL library in "%MKLROOT%"
)
-echo Found Intel MKL library in %MKLROOT%
+if "%FOUND_MKL%" == "false" if "%FOUND_CUDA%" == "false" (
+ echo.
+ echo Error: neither CUDA SDK nor Intel MKL were found, but at least one of them must be installed.
+)
:: -------------------------
:: BOOST_INCLUDEDIR and BOOST_LIBRARYDIR can be both set to an existing Boost installation.
@@ -156,29 +164,31 @@ if not exist "%BOOST_INCLUDEDIR%" (
echo BOOST_INCLUDEDIR is set to a non existing path:
echo "%BOOST_INCLUDEDIR%"
echo Please set BOOST_INCLUDEDIR and BOOST_LIBRARYDIR to the installation path of the Boost library.
- exit /b 1
-)
-if not exist "%BOOST_INCLUDEDIR%\boost\version.hpp" (
+ set "FOUND_BOOST=false"
+) else if not exist "%BOOST_INCLUDEDIR%\boost\version.hpp" (
echo Boost header files were not found in this folder:
- echo "%BOOST_INCLUDEDIR%"
+ echo "%BOOST_INCLUDEDIR%\boost"
echo Please make sure Boost is correctly installed.
- exit /b 1
-)
-
-if not exist "%BOOST_LIBRARYDIR%" (
+ set "FOUND_BOOST=false"
+) else if not exist "%BOOST_LIBRARYDIR%" (
echo BOOST_LIBRARYDIR is set to a non existing path:
echo "%BOOST_LIBRARYDIR%"
echo Please set BOOST_INCLUDEDIR and BOOST_LIBRARYDIR to the installation path of the Boost library.
- exit /b 1
-)
-if not exist "%BOOST_LIBRARYDIR%\boost_*.lib" (
+ set "FOUND_BOOST=false"
+) else if not exist "%BOOST_LIBRARYDIR%\boost_*.lib" (
echo Boost library files were not found in this folder:
echo "%BOOST_LIBRARYDIR%"
echo Please make sure Boost is correctly installed.
- exit /b 1
+ set "FOUND_BOOST=false"
+) else (
+ echo Found Boost headers in "%BOOST_INCLUDEDIR%" and libs in "%BOOST_LIBRARYDIR%"
+)
+
+if "%FOUND_BOOST%" == "false" (
+ echo.
+ echo Warning: Boost was not found. marian-server will not be compiled.
)
-echo Found Boost headers in "%BOOST_INCLUDEDIR%" and libs in "%BOOST_LIBRARYDIR%"
:: -------------------------
:: OPENSSL_ROOT_DIR can be set to an existing OpenSSL installation.