[Cmake] cmake -E

Kevin Wright Kevin.Wright at ansys.com
Tue, 6 Jan 2004 14:28:54 -0500


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.