Windows batch script enhancements (#88)

* Make possible to invoke run-cmake.bat, build-ifcopenshell.cmd (now bat), install-ifcopenshell.cmd (now bat) directly from File Explorer or command prompt without VS env vars set, if BuildDepsCache file exists, by utilizing CMake's --build functionality. Do not delete CMakeCache.txt always now in order to keep the build options consistent.

* win/readme.md tweaks + make the line width smaller

* Windows batch files: use the last modified BuildDepsCache. Show an error if GEN_SHORTHAND does not exist.
This commit is contained in:
Ali Kämäräinen
2016-06-17 23:30:33 +03:00
committed by Thomas Krijnen
parent be10bc46ca
commit 3c418e8e0a
7 changed files with 115 additions and 47 deletions
+4 -2
View File
@@ -66,6 +66,7 @@ echo(!GENERATOR! | findstr /c:"vs20" >nul && (
:GeneratorShorthandCheckDone
:: Deduce desired architecture from the location of cl.exe
:: TODO harmless "INFO: Could not find files for the given pattern(s)." spam if cl.exe not in path
where cl.exe | findstr /c:"amd64" >nul
set START=%ERRORLEVEL%
@@ -136,6 +137,7 @@ set GENERATOR=%GENERATOR: 2012=%
set GENERATOR=%GENERATOR: 2010=%
:CMake3AndNewer
set GEN_SHORTHAND=vs%VS_VER%-%TARGET_ARCH%
:: VS project file extension is different on older VS versions
set VCPROJ_FILE_EXT=vcxproj
IF %VS_VER%==2008 set VCPROJ_FILE_EXT=vcproj
@@ -150,10 +152,10 @@ set PATH=%PATH%;%~dp0utils
:: set DEPS_DIR=%CD%\deps-%VS_VER%-%TARGET_ARCH%
pushd ..
set DEPS_DIR=%CD%\deps
set INSTALL_DIR=%CD%\deps-vs%VS_VER%-%TARGET_ARCH%-installed
set INSTALL_DIR=%CD%\deps-%GEN_SHORTHAND%-installed
REM set INSTALL_DIR=%CD%\deps-vs%VS_VER%-%TARGET_ARCH%-%DEBUG_OR_RELEASE_LOWERCASE%-installed
:: BUILD_DIR is a relative build directory used for CMake-based projects
set BUILD_DIR=build-vs%VS_VER%-%TARGET_ARCH%
set BUILD_DIR=build-%GEN_SHORTHAND%
popd
GOTO :EOF