[CMake] object file target

Juan Sanchez Juan.Sanchez at amd.com
Mon Jul 30 16:44:06 EDT 2007


It's pretty messy the Makefile I am trying to convert.  It is trying to
do something like this:
g++ -shared obj1.o obj2.o obj3.o staticarchivex.a staticarchivey.a -o
sharedlibrary.so

The static archives are compiled with "-fPIC" so dynamic relocation is
not a problem.

Unfortunately, this only appears to work when at least one object is
listed first, so I need at least one object.

Too make a long story short.  It would be nice to just have optimal
dependency checking for the object files so they aren't always being
recompiled.  If you know how to extract the archives into a shared
library in a better way, I'd appreciate that info too.


Regards,

Juan

Alexander Neundorf wrote:
> On Monday 30 July 2007 16:24, Juan Sanchez wrote:
>> Is there a command for creating a .o target on Linux?  If I create my
>> own custom command for creating an object, the .o file is being
>> recompiled every time.  I need the dependency scanner to recognize when
>> a .cc file does not need to be compiled into a .o file.
> 
> Why do you need to do this ? It shouldn't be necessary. Maybe there's a better 
> way to achieve what you need.
> 
> Bye
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 


-- 
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395




More information about the CMake mailing list