Skip to content

Commit 8420fdc

Browse files
committed
Don't build Embree with VC 11, fix VC 12 build
1 parent da99c2b commit 8420fdc

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

BuildAll.bat

+17-5
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ echo [12/13] Building SeExpr...
388388
REM ===============================================================================
389389

390390
:embree
391+
392+
if [platform] == [vc11] (
393+
echo [13/13] Skipping Embree ^(not supported with Visual Studio 2012^)...
394+
goto end_embree
395+
)
396+
391397
echo [13/13] Building Embree...
392398

393399
mkdir %root%build\%platform%\embree-debug 2>nul
@@ -401,15 +407,21 @@ echo [13/13] Building Embree...
401407
mkdir %root%build\%platform%\embree-release 2>nul
402408
pushd %root%build\%platform%\embree-release
403409
echo === Embree (Release) ========================================================== > BUILDLOG.txt
404-
REM The CMake arguments
405-
REM -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF -DCMAKE_CXX_FLAGS="-d2SSAOptimizer-"
406-
REM are required to work around a bug in the new SSA optimizer introduced in VS 2015:
407-
REM https://github.com/embree/embree/issues/157#issuecomment-334696351
408-
cmake -G %generator% -DCMAKE_BUILD_TYPE=Release -DEMBREE_STATIC_LIB=ON -DEMBREE_TUTORIALS=OFF -DEMBREE_RAY_MASK=ON -DEMBREE_TASKING_SYSTEM=INTERNAL -DEMBREE_ISPC_SUPPORT=OFF -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF -DCMAKE_CXX_FLAGS="-d2SSAOptimizer-" -DCMAKE_INSTALL_PREFIX=%root%stage\%platform%\embree-release %src%\embree %redirect%
410+
if [platform] == [vc14] (
411+
REM The CMake argument
412+
REM -DCMAKE_CXX_FLAGS="-d2SSAOptimizer-"
413+
REM is required to work around a bug in the new SSA optimizer introduced in VS 2015:
414+
REM https://github.com/embree/embree/issues/157#issuecomment-334696351
415+
cmake -G %generator% -DCMAKE_BUILD_TYPE=Release -DEMBREE_STATIC_LIB=ON -DEMBREE_TUTORIALS=OFF -DEMBREE_RAY_MASK=ON -DEMBREE_TASKING_SYSTEM=INTERNAL -DEMBREE_ISPC_SUPPORT=OFF -DCMAKE_CXX_FLAGS="-d2SSAOptimizer-" -DCMAKE_INSTALL_PREFIX=%root%stage\%platform%\embree-release %src%\embree %redirect%
416+
) else (
417+
cmake -G %generator% -DCMAKE_BUILD_TYPE=Release -DEMBREE_STATIC_LIB=ON -DEMBREE_TUTORIALS=OFF -DEMBREE_RAY_MASK=ON -DEMBREE_TASKING_SYSTEM=INTERNAL -DEMBREE_ISPC_SUPPORT=OFF -DCMAKE_INSTALL_PREFIX=%root%stage\%platform%\embree-release %src%\embree %redirect%
418+
)
409419
devenv embree3.sln /build Release /project INSTALL %redirect%
410420
type BUILDLOG.txt >> %root%build\%platform%\BUILDLOG.txt
411421
popd
412422

423+
:end_embree
424+
413425
REM ===============================================================================
414426

415427
:done

0 commit comments

Comments
 (0)