Reusing object files without creating targets

Hi,

I have an interesting problem. Our current build system reuses object files from other directories all the time. I have played around with using Object Libraries for an implementation in CMake. This would work great, but we want to be able to use Visual Studio Solutions. When we use Object Libraries, we end up creating 1100+ targets and with Visual Studio, this creates 1100+ projects, which takes forever to load and uses a heavy amount of CPU and memory usage. I understand that using Object Libraries is the correct “CMake” way to go, but is there any work around so we can still use Visual Studio?

Thanks,

Carter Olsen

I believe that Visual Studio now supports loading up any CMake build tree, including those using the Ninja generator, so that may be one way of doing it. Anything else I can think of would require reorganizing the code into fewer targets since targets are basically the only abstraction offered, sorry.