TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25457 14
CMake and c++ libraries

Hi everyone,

At work, I stumbled upon something that seems completely absurd to me, but perhaps someone here will have a different perspective.

We have a software architect who defines the data model using .idl files (a kind of simplified struct, if you're not familiar with it). These .idl files generate C++ code.

Historically, it was C++ 98 code. And now it also includes "modern" C++ code, meaning that arrays are no longer T[\] but rather vector<T>, for example. Originally, these IDL files are used within our kind-of micro services. They update the data model within the distributed monolith, and we develop related features.

Under the pretext that these are the same source IDL files, our software architect imposes and provides us with the same CMake target name for both. This means we have to generate one install folder in 98 and another in "modern" C++.

And for the software where we'd like to start mixing the two within the same CMake project, we're stuck because we're limited to a single CMake target for two final .so files.

Do any of you see the point of his approach?

Would you recommend having a unique target name for each .so/.a ?

https://redd.it/1ua0xc4
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Sep 29, 2026Boost.Graph 1.95 will be C++17 Dear Boost.Graph community, In two release cycles (Boost re…
  2. Sep 26, 2026Token Sequence Injection & Modern Macros: The Most Game-Changing Compile-Time Feature in C…
  3. Sep 25, 2026myStringStream.str("") Considered Harmful Under C++20 I was recently looking at some (rath…
  4. Sep 20, 2026A clever branch free optimization I'm the developer of memlz which is an extremely fast co…
  5. Sep 15, 2026Inside Boost.PolyCollection https://bannalia.blogspot.com/2026/09/inside-boostpolycollecti…
  6. Sep 11, 2026C++26: Standard Library Hardening Experiments https://www.cppstories.com/2026/hardening-ex…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →