Re: RFC: Library unit testing and symbol visibility

2023-07-24 Thread Lukas Sommer
Another approach involves building the library twice: once as a "normal" build and once as an "internal" build. To implement this, you can create two CMake targets, "mylibrary" and "mylibrary_internal," while utilizing the same headers and source files for both targets. However, for the internal ta

Re: RFC: Library unit testing and symbol visibility

2023-07-23 Thread Thiago Macieira
On Sunday, 23 July 2023 07:16:05 PDT Stefan Brüns wrote: > 3. ? > > Kind regards, Qt's solution is that it builds in a "build for testing" mode (it defines the QT_BUILD_INTERNAL macro, for historical reasons meaning "internal to Trolltech") in which extra symbols are exported using the Q_AUTOTE

RFC: Library unit testing and symbol visibility

2023-07-23 Thread Stefan Brüns
Hi, I am looking for some feedback regarding unit testing libraries (e.g. Frameworks libraries, but not limited to). First, some background: As long as on limits oneself to testing the public API of a library all is easy, linking and calling the exposed API just works. Some say that's all that