0

does anyone know is there any maximum limit on the number of interface libraries we can link to a executable target in cmake

  • I am aware about none of such limits: From CMake view, for a single target you can call `target_link_libraries` as many times as you want. – Tsyvarev Apr 22 '21 at 09:25
  • I'm pretty sure you cannot use more than `std::numeric_limits::max() - 1` ;) There may be limitations on the number of libs for the build system you're generating with cmake, but afaik cmake itself does not put any constraints on the number of libs your porject can contain (other than the limitations of the data structures used internally). Of course the result of using too many libs could be a bad performance of configuring/building the project... – fabian Apr 22 '21 at 17:05

0 Answers0