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? The source file is included in the main executable through add_executable(), and it's added to each of the shared libraries through add_library().

Thanks,
Naram Qashat
_______________________________________________
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