I’ve just finished Step 1 of the tutorial and I got stuck for a while on TODO 10. I’ve figured it out now but thought I’d put a word in here about it.
TODO 7 asks us to specify the version as 1.0 in CMakeLists.txt. We later use configure_file() to create the TutorialConfig.h file in the builds directory. However, when I finished the section up and tried to build, I got an error saying that Tutorial_VERSION_MINOR was undeclared.
I believe this is because when Tutorial_VERSION_MINOR is zero, configure_file() considers it to be “OFF.” This is corroborated by the TutorialConfig.h file in the builds directory, which looks like this:
#define Tutorial_VERSION_MAJOR "1"
/* #undef Tutorial_VERSION_MINOR */
If I make the version 0.0, TutorialConfig.h looks like this:
/* #undef Tutorial_VERSION_MAJOR */
/* #undef Tutorial_VERSION_MINOR */
I’m not sure if I have a slightly different system or if I missed something, but I followed the instructions quite closely. I’m not sure how other people didn’t run into this problem to be honest.