-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
bld.bat
31 lines (24 loc) · 937 Bytes
/
bld.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
mkdir build
cd build
cmake.exe .. -G "NMake Makefiles JOM" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_TESTING=OFF ^
|| goto :error
:: Re-add above when CUDA is available
:: -DCUDA_TOOLKIT_ROOT_DIR="%LIBRARY_BIN%" ^
jom -j %NUMBER_OF_PROCESSORS% || goto :error
jom -j %NUMBER_OF_PROCESSORS% install || goto :error
jom -j %NUMBER_OF_PROCESSORS% PythonInstall || goto :error
:: Workaround overlinking warnings
copy %SP_DIR%\simtk\openmm\_openmm* %LIBRARY_BIN% || goto :error
copy %LIBRARY_LIB%\OpenMM* %LIBRARY_BIN% || goto :error
copy %LIBRARY_LIB%\plugins\OpenMM* %LIBRARY_BIN% || goto :error
:: Better location for examples
mkdir %LIBRARY_PREFIX%\share\openmm || goto :error
move %LIBRARY_PREFIX%\examples %LIBRARY_PREFIX%\share\openmm || goto :error
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%