Re: [CMake] Multiple output directories

2011-06-28 Thread Michael Hertling
On 06/28/2011 12:36 PM, Michael Hertling wrote:
> On 06/28/2011 10:40 AM, pellegrini wrote:
>> Hello everybody,
>>
>> I would like to know if there is a cmake command to place my generated 
>> executable in several directories in one shot.
>>
>> Using SET(EXECUTABLE_OUTPUT_PATHmy_path1) will allow to customize 
>> the place where my executable should be placed
>> but only in a single directory I guess.
>>
>> Any idea ?
>>
>> thanks a lot
>>
>> Eric
> 
> You might use several
> 
> ADD_CUSTOM_COMMAND(TARGET myexe POST_BUILD
> COMMAND ${CMAKE_COMMAND} -E copy $ mypath)
> 
> commands for this purpose.

Or just one with several COMMAND clauses:

ADD_CUSTOM_COMMAND(TARGET myexe POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $ mypath1
COMMAND ${CMAKE_COMMAND} -E copy $ mypath2
COMMAND ${CMAKE_COMMAND} -E copy $ mypath3)

Regards,

Michael
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Multiple output directories

2011-06-28 Thread Michael Hertling
On 06/28/2011 10:40 AM, pellegrini wrote:
> Hello everybody,
> 
> I would like to know if there is a cmake command to place my generated 
> executable in several directories in one shot.
> 
> Using SET(EXECUTABLE_OUTPUT_PATHmy_path1) will allow to customize 
> the place where my executable should be placed
> but only in a single directory I guess.
> 
> Any idea ?
> 
> thanks a lot
> 
> Eric

You might use several

ADD_CUSTOM_COMMAND(TARGET myexe POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $ mypath)

commands for this purpose.

'hope that helps.

Regards,

Michael
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake