On Tuesday 13 October 2009, Naram Qashat wrote:
> Say I have a main executable and a number of shared libraries that rely on
> that executable.  Say I have a certain C++ source that is required to be
> built by not only the main executable, but also every single shared library
> (the source in question is a Windows-specific file to handle memory
> allocations).  I have found that when using a Visual Studio generator,
> CMake causes the source file to be rebuilt for every single shared library,
> causing an increase in build time.  Is there an easy way to have the object
> file not be rebuilt every single time, but be reused for all the shared
> libraries?  

No, it's a feature.
You may use different compile flags etc. for your different targets, so you 
may get different object files.

You may hack around that by creating a static library, figuring out the path 
to the object files and then link these object files directly to your targets 
(or something like that, but I've never done that and I don't recommend it).

Alex


_______________________________________________
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

Reply via email to