Static Library VS Object Library Cache generation time

In my current project, we are creating C++ static libraries and these static libraries are getting linked to my executables. Now we looking directionally to create Object Libraries and consume them in linkage. When we changed to Object Library from Static Library cache generation time increased by 5 times of what it was taking in case of Static Library.

Using Static Library

1> [CMake] – Configuring done (2.0s)
1> [CMake] – Generating done (7.4s)

Using Object Library

1> [CMake] – Configuring done (1.6s)
1> [CMake] – Generating done (38.0s)

Is this expected behaviour? or is there way to optimize it.

1 Like