add_custom_command post_build is mangled in Visual Studio
I am attempting
ADD_CUSTOM_COMMAND(
TARGET MyTarget
POST_BUILD
COMMAND aaa
VERBATIM
)
With Visual Studio 2017 as the generator. When I open (in Visual Studio) Project Properties -> Build Events -> Post-Build Event ->Command Line, I see:
setlocal
aaa
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
Only aaa should be there.
I have also tried this in Visual Studio 2013 with similar results. I am using CMake Gui 3.12.0.
Edited by Matthew Grivich