CMake, C++, and TDD


I’m in the middle of an experimental C++ fibonacci program in an attempt to familiarize myself with CMake. I barely know “Make” and now I’m ankle-deep in CMake. How did I get here? It began as part of my exploration into C++ TDD. I’ve been periodically playing with C++ testing tools trying to find a comfortable way to develop some decent cross platform logic. My exploring took me to mnmlstc/unittest. Hi, I’m Cliff. You’re here because you write unit tests. I’m here trying to find the appropriate way to do so in C++.

there’s not much to blab about tonight. I’m only passing #define macros from a config header template through to my c++ logic and scratching the surface of integrating tests with CMake. So far I’ve learned that configuring the install target of your make file uses a default prefix of “/usr/local” when you use relative paths but you can override this by using absolute paths. I’ve also learned how to “add_definition”s.

I’m a long way from mnmlstc but I’m having fun. Hopefully I’ll have some decent object models emerging from my experiments… and hopefully these models will be properly coded in C++11. Have you ever tried to understand a new technology from the eye of a test framework you’ve never used before? Me neither…