# Illegal CustomBuild for MSVC 18

**URL:** <https://www.ruby-forum.com/t/illegal-custombuild-for-msvc-18/241345>\
**Category:** GNU Radio\
**Created:** [March 31, 2015, 12:39pm UTC](https://www.ruby-forum.com/t/illegal-custombuild-for-msvc-18/241345 "2015-03-31T12:39:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 31, 2015, 12:39pm UTC](https://www.ruby-forum.com/t/illegal-custombuild-for-msvc-18/241345/1 "2015-03-31T12:39:00Z")

</div>

I have had some more success building Gr using MSVC v18  
than MSVC v16 previously (nearly impossible). Besides the  
high noise-level (due to cmake/msvc/config.h), the C++ building  
seems fine.

But the build stops in ‘build\gnuradio-runtime\swig’  
at some CustomBuild/CustomCommand. Here is from the MSbuild  
output:

if %errorlevel% neq 0 goto :cmEnd  
:cmEnd  
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone  
:cmErrorLevel  
exit /b %1  
:cmDone  
if %errorlevel% neq 0 goto :VCEnd  
setlocal  
“” \<\< !! because of this  
if %errorlevel% neq 0 goto :cmEnd  
:cmEnd  
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone  
:cmErrorLevel  
exit /b %1  
:cmDone  
if %errorlevel% neq 0 goto :VCEnd  
setlocal  
“”  
if %errorlevel% neq 0 goto :cmEnd  
:cmEnd  
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone  
:cmErrorLevel  
exit /b %1  
:cmDone  
if %errorlevel% neq 0 goto :VCEnd  
Building Custom Rule  
F:/gv/dx-radio/gnuradio-3.x/gnuradio-runtime/swig/CMakeLists.txt

‘""’ is not recognized as an internal or external command,

What command in ‘gnuradio-runtime\swig\CMakeLists.txt’ could trigger  
this  
illegal CMD batch snippet?

BTW. I generated the .sln/.vcxproj files by a script:  
setlocal  
cd build  
set OPT=-DCMAKE\_CXX\_COMPILER=cl -DCMAKE\_C\_COMPILER=cl ^  
-DCMAKE\_CXX\_COMPILER\_ENV\_VAR=-nologo -O2 -MD ^  
-DCMAKE\_C\_COMPILER\_ENV\_VAR=-nologo -O2 -MD ^  
-Wno-dev -DCMAKE\_BUILD\_TYPE=“Release” -DENABLE\_TESTING=1 ^  
-DPORTAUDIO\_LIBRARIES=%MINGW32%/src/Sound/Portaudio/lib/portaudio\_static\_x86.lib

cmake %OPT% -G “Visual Studio 12 2013” …  
…

–  
–gv
