I use cmake to generate a VS 2017 solution. I use "add_custom_command" to add a post build event.
The problem is that it add some quotes around my command code, and this make my script failing !
Do you know why ? And how to get rid of it ?
Here is my command :
add_custom_command(TARGET "MyProject"
VERBATIM
POST_BUILD
COMMAND LIB.EXE -OUT:$(OutDir)MyProject_static.lib c:/libs/liba.lib c:/libs/libb.lib
COMMENT "Merging into a static library")
Here is what I find in VS :
setlocal
LIB.EXE "-OUT:$(OutDir)MyProject_static.lib c:/libs/liba.lib c:/libs/libb.lib"
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
The problem is that cmake add quotes around "-OUT..." , how can I remove them ?
Any idea ?
Thanks