Re: [cmake-developers] Is it possible to clone an existing target?

2017-03-22 Thread Egor Pugin
Aliases for imported targets also would be useful. I found some old email threads, but seems they had not been implemented. On 22 March 2017 at 16:53, Stanislav Pankevich wrote: > Hi Brad, > > Thanks for the answer. > > Yes, I am going to write my own macro which, I hope, will do the job for the

Re: [cmake-developers] Is it possible to clone an existing target?

2017-03-22 Thread Stanislav Pankevich
Hi Brad, Thanks for the answer. Yes, I am going to write my own macro which, I hope, will do the job for the most cases. My use case is to generate the LLVM bitcode artefacts *.bc from existing CMake target instead of a binary that it would produce by default. Cloning existing target and then pa

Re: [cmake-developers] Is it possible to clone an existing target?

2017-03-22 Thread Brad King
On 03/22/2017 03:30 AM, Stanislav Pankevich wrote: > I have a target `MyTarget`. Is there a way I could do something like > > clone_target(MyTarget MyNewTarget) > > so that MyNewTarget appears to be the exact clone (deep copy) > of original target with the only difference of a target name? There

[cmake-developers] Is it possible to clone an existing target?

2017-03-22 Thread Stanislav Pankevich
Hello, I have a target `MyTarget`. Is there a way I could do something like clone_target(MyTarget MyNewTarget) so that MyNewTarget appears to be the exact clone (deep copy) of original target with the only difference of a target name? P.S. I understand that complex projects may be the edge-case