bad generated custom command syntax on windows
This is hard to believe. Cmake 3.15.3 (generator VC15) is generating custom command lines that won't execute.
Exapmple:
the cmake script has
COMMAND mkdir ${ISPC_BUILD_DIR} && ${ISPC_SOURCE_DIR}/ispc_win.exe ${ISPC_FLAGS} -o ${ISPC_BUILD_DIR}/kernel_ispc.o -h ${ISPC_BUILD_DIR}/kernel_ispc.h ${TEXCOMP_DIR}/kernel.ispc
The generated vcxproj has
<Command Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">setlocal mkdir C:/Users/tommy/build-FB360-dep/ispc_build && C:/Users/tommy/FB-6dof/facebook360/source/thirdparty/bc7_compressor/ISPCTextureCompressor/ispc\ispc_win.exe -O2 -woff --arch=x86-64 --target=sse2,avx --opt=fast-math --pic -o C:/Users/tommy/build-FB360-dep/ispc_build\kernel_astc_ispc.o -h C:/Users/tommy/build-FB360-dep/ispc_build\kernel_astc_ispc.h C:/Users/tommy/FB-6dof/facebook360/source/thirdparty/bc7_compressor/ISPCTextureCompressor/ispc/ispc_texcomp\kernel_astc.ispc if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd</Command>
At build time this fails with the terse message 'The syntax of the command is incorrect.'
Presumably because of the forward slashes.
An almost identical script works fine on Linux.