[Cmake] cmake -E

William A. Hoffman billlist at nycap.rr.com
Wed, 07 Jan 2004 08:03:53 -0500


What version of cmake are you using? 

I just tried the following:

ADD_CUSTOM_COMMAND(TARGET generator POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different generator.exe foo.exe)

and this was in the .dsp file:

PostBuild_Cmds=c:\hoffman\CMake-vc-dashboard\bin\Release\cmake.exe -E copy_if_different generator.exe foo.exe 

-Bill

At 02:28 PM 1/6/2004, Kevin Wright wrote:
>I'm trying to use cmake -E on Windows in what I assume is a fairly straight-forward way, but I'm running into some trouble.
>
>I'm trying to copy some files as part of a build, so I've created a custom command:
>
>ADD_CUSTOM_COMMAND(TARGET copyDlls POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${Source} ${Destination})
>
>When I look at the version of this that gets passed into Visual C++ is:
>
>"c:\program files\CMake\bin\cmake.exe" "-E copy_if_different <path>/lib.dll <path>/lib.dll"
>
>Which seems to choke up CMake.  If I remove the quotes from around the args, it works fine, but with them there, that syntax won't work from within VC++, or from the command line.
>
>Is there a way to make those quotes go away?  Is the problem that I've set things up incorrectly?
>
>Thanks for any help,
>Kevin.
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake