Re: [CMake] How to duplicate a source file and rename it

2018-09-21 Thread Ke Gao
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

Re: [CMake] How to duplicate a source file and rename it

2018-09-21 Thread Ke Gao
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../../file.c ${CMAKE_CURRENT_SOURCE_DIR}/../../ aaa_file.c ) Is there an easier way to do this? On Fri, Sep 21, 2018 at 4:10 PM J Decker wrote: > > > On Fri, Sep 21, 2018 at 3:00 PM Ke Gao wrote

[CMake] How to duplicate a source file and rename it

2018-09-21 Thread Ke Gao
uot;file" command doesn't work well for this. Thank you very much. -- .......... Ke Gao -- Powered by www.kitware.com Please keep messages on-topic and check the

Re: [CMake] Best way to combine generated static libraries into a single static library

2018-09-21 Thread Ke Gao
So I guess in order to include the object-files from a third party static library, the only way would be to first extract it's object-files and then combine them? On Fri, Sep 21, 2018 at 12:34 PM Deniz Bahadir wrote: > Am 21.09.2018 um 18:38 schrieb Ke Gao: > > Hi David, > > >

Re: [CMake] Best way to combine generated static libraries into a single static library

2018-09-21 Thread Ke Gao
the error > cmake gives you could help ? > > David > On Fri, Sep 21, 2018 at 4:52 PM Ke Gao wrote: > > > > Thank you all for the help. > > > > I finally use a way quite similar to David's first approach. I first > generate all sub-projects into object libraries

Re: [CMake] Best way to combine generated static libraries into a single static library

2018-09-21 Thread Ke Gao
) call. > > To work around that, you can use PARENT_SCOPE (not sure if that works > > accross several levels), or includes (defines those variables into > > separate files living in each subfolders and include them in the > > parent CMakeLists). > > > > Hope th

[CMake] Best way to combine generated static libraries into a single static library

2018-09-20 Thread Ke Gao
. Is there an elegant way to do this, or maybe an existing function? Thank you very much. -- .. Ke Gao -- Powered by www.kitware.com Please keep messages

[CMake] Find parent of ${PROJECT_SOURCE_DIR}

2018-08-28 Thread Ke Gao
) -- .. Ke Gao -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake