[CMake] Copying files (different name)

David Cole david.cole at kitware.com
Fri May 27 05:47:49 EDT 2011


Using configure_file with the COPYONLY flag is a reasonable technique:

  http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:configure_file


On Thu, May 26, 2011 at 8:38 PM, Tyler <tyler at cryptio.net> wrote:
> Don't know if file() will work but configure_file() will. You might
> want the NO_REPLACE flag or whatever it's called to prevent accidental
> variable interpolation.
>
> tyler
>
> On Thu, May 26, 2011 at 4:46 PM, Nicholas Yue <yue.nicholas at gmail.com> wrote:
>> Hi,
>>
>>    With the FILE ( COPY .. DESTINATION) command, is there a way to create a
>> second copy of a file at the DESTINATION with a different name ? In my case,
>> my DESTINATION is the same as the original location.
>>
>>    Basically, I am trying to duplicate this command line
>>
>>    copy header.h.vc header.h
>>
>> Regards
>>
>> _______________________________________________
>> 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
>>
> _______________________________________________
> 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
>


More information about the CMake mailing list