[CMake] How to run shell command in CMakeLists.txt

Verweij, Arjen VerweijA at tass-safe.com
Mon Mar 29 10:56:14 EDT 2010


Hi,

>> Please guide me how to create one static lib from multiple static
>libs.
>>
>> Can I use ar -x libname and then again make ar from the *.o files?
>> Is there any other way?
>> --
>> Thanks & Regards,
>> Kiran Patil
>
>Don't even try. Create the single static lib in the first place. There
>has been a long discussion about this just recently, refer to that for
>more info (please read to the end, there were some dependency problems
>in the posted solutions):
>http://marc.info/?l=cmake&m=126841136518109&w=2

Also note (as I am finding out) that cmake doesn't really seem suitable to develop binaries in this fashion. Previously we would create a new binary with the preexisting stuff and just put a new object file in the link rule for the binary. That was pretty fast. Now cmake takes care of these things, and this no longer is an option. So you may want to consider creating a shared objects version for your developers.

Regards,
Arjen


More information about the CMake mailing list