wdas/ptex

Multi-threaded build seems broken

jcowles opened this issue · 1 comments

I'm building on windows, and get compile errors with mulit-core builds enabled, but compiles fine single threaded.

cmake -G "Visual Studio 14 2015 Win64" ^
-DCMAKE_INSTALL_PREFIX="%current%\local" ^
-DZLIB_INCLUDE_DIR="%current%\local\include" ^
-DZLIB_LIBRARY="%current%\local\lib\zlib.lib" ^
....\ptex

// This works:
cmake --build . --target install --config Release -- /maxcpucount:1

// This fails with build errors:
cmake --build . --target install --config Release -- /maxcpucount:16

ninja https://github.com/ninja-build/ninja/releases seems to work on Windows. Would you mind testing PR #35 from my fork and see if building with ninja fixes the issue?

Try the current master branch with ninja too; if you're hitting a deficiency in VS then ninja should sidestep it. Pass -G Ninja to cmake to try it out.

ninja builds in parallel by default so you won't have to pass extra flags via -- anymore.

https://stackoverflow.com/questions/10688549/how-to-configure-portable-parallel-builds-in-cmake#31132630