Re: [CMake] a question about archiving libraries
Hi, Thank you so much for your reply. About archiving the libraries, can I use ar with custom_command() to archive the three libraries into one big library.? Thank you in advance Mina From: Eric Noulard eric.noul...@gmail.com To: mina adel elecengineer_m...@yahoo.com Cc: cmake@cmake.org Sent: Thu, February 3, 2011 2:12:26 AM Subject: Re: [CMake] a question about archiving libraries 2011/2/3 mina adel elecengineer_m...@yahoo.com: Hi All In my code I use an available libraries (amd btf colamd) In order to compile those using cmake I use add_custom_command() to cd into each folder and then run make for each library. You should have a look at: ExternalProject_Add from the ExternalProject CMake module. Now each library will have a lib file compiled, for example Lib/libamd.a Now, I want to take all the made libraries from the three folders (amd btf colamd), and make one big library (libsparse.a). How I can do this using cmake? You don't, at least not 'out of the box' with CMake. If you know how to do that by hand then you can craft a custom commande to do it. You are looking for something like Convenience library which are not supported by CMake: http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F Now if your 3 libs (amd btf colamd) are just a set of file to compile then may be creating a add_library CMake rule which is the collation of all sources in there may be a solution. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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] a question about archiving libraries
2011/2/4 mina adel elecengineer_m...@yahoo.com: Hi, Thank you so much for your reply. About archiving the libraries, can I use ar with custom_command() to archive the three libraries into one big library.? This may not work on all platforms. Some people seems to do the same trick http://www.mail-archive.com/cmake@cmake.org/msg16674.html You may find other reference to merging static libraries from the CMake ML archive: http://www.cmake.org/Wiki/CMake_FAQ#Where_can_I_find_searchable_CMake_Mailing_Archives.3F -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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] a question about archiving libraries
2011/2/3 mina adel elecengineer_m...@yahoo.com: Hi All In my code I use an available libraries (amd btf colamd) In order to compile those using cmake I use add_custom_command() to cd into each folder and then run make for each library. You should have a look at: ExternalProject_Add from the ExternalProject CMake module. Now each library will have a lib file compiled, for example Lib/libamd.a Now, I want to take all the made libraries from the three folders (amd btf colamd), and make one big library (libsparse.a). How I can do this using cmake? You don't, at least not 'out of the box' with CMake. If you know how to do that by hand then you can craft a custom commande to do it. You are looking for something like Convenience library which are not supported by CMake: http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F Now if your 3 libs (amd btf colamd) are just a set of file to compile then may be creating a add_library CMake rule which is the collation of all sources in there may be a solution. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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