It just can't copy to the same source directory.
On Fri, Sep 21, 2018 at 4:32 PM J Decker wrote:
>
>
> On Fri, Sep 21, 2018 at 3:29 PM J Decker wrote:
>
>>
>>
>> On Fri, Sep 21, 2018 at 3:24 PM Ke Gao wrote:
>>
>>> Thanks. I forgot to say my CMakeList.txt is not located together with
>>> the s
On Fri, Sep 21, 2018 at 3:29 PM J Decker wrote:
>
>
> On Fri, Sep 21, 2018 at 3:24 PM Ke Gao wrote:
>
>> Thanks. I forgot to say my CMakeList.txt is not located together with the
>> source files. So I used the following, it seems not working:
>> add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_
On Fri, Sep 21, 2018 at 3:24 PM Ke Gao wrote:
> Thanks. I forgot to say my CMakeList.txt is not located together with the
> source files. So I used the following, it seems not working:
> add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/../../aaa_file.c
>DEPENDS $
Thanks. I forgot to say my CMakeList.txt is not located together with the
source files. So I used the following, it seems not working:
add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/../../aaa_file.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../../file.c
On Fri, Sep 21, 2018 at 3:00 PM Ke Gao wrote:
> Hi,
>
> In a project, I need to first duplicate a source file and rename it. For
> example, I want to change "file.c" to "aaa_file.c", and after compiling, I
> will delete it. This is similar to using "cp file.c aaa_file.c". How to
> easily do this
Hi,
In a project, I need to first duplicate a source file and rename it. For
example, I want to change "file.c" to "aaa_file.c", and after compiling, I
will delete it. This is similar to using "cp file.c aaa_file.c". How to
easily do this in CMake? I found "file" command doesn't work well for this