One of the things a good CMake-powered C++ library should do is to test its own integration - in other words, if others can plug it into their projects. One reason is obvious - nobody will use your library if they can't. The second one is pragmatic - the tests act as documentation for the users.
I've spent many hours refining my integration testing of CMake code, and I've compiled my learnings into the following article:
➤ https://medium.com/@nerudaj/cmake-integration-testing-4d71184525ea
I've also fallen into the inevitable rabbit hole of dependency management in CMake, so if you want to learn about that, the article has you covered as well! 😵💫
What do you think? Are there other aspects of integration that are worth testing? And would you be interested in an article on how to make findable prebuilt packages with CMake?
#cpp #cmake #integrationtesting