# Tutorial Step2

**URL:** <https://discourse.cmake.org/t/tutorial-step2/8094>\
**Category:** Code\
**Created:** [May 10, 2023, 8:54am UTC](https://discourse.cmake.org/t/tutorial-step2/8094 "2023-05-10T08:54:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HardoMX](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hardomx/32/3425_2.png) [@HardoMX](https://discourse.cmake.org/u/HardoMX)\
**Post date:** [May 10, 2023, 8:54am UTC](https://discourse.cmake.org/t/tutorial-step2/8094/1 "2023-05-10T08:54:20Z")

</div>

### Hi everyone, I have just started learnign CMake throught the tutorial.

However, I have kinda gotten stuck at step2. This is because the instructions have a TODO instruction, that is _ **completely DIFFERENT** _ from that of the actual files.  
For example, on the website it says to do TODO 8: [This](https://cmake.org/cmake/help/latest/guide/tutorial/Adding%20a%20Library.html#cmakelists-txt-use-mymath) in the top-level CMakeLists, which I interpret as the step 2/CMakeLists, but the TODO comment is in the step2/MathFunctions/CMakeLists file. All following TODO:s in exercise 2 are the same, the site says something, but the files say something different.

#### I don’t think this is intentional, but how are you supposed to understand the mechanics, when it seems the tutorial doesn’t even understand itself?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [May 10, 2023, 11:08am UTC](https://discourse.cmake.org/t/tutorial-step2/8094/2 "2023-05-10T11:08:48Z")

</div>

@betsy.mcphail

---

<div class="post-metadata">

**Author:** ![betsy.mcphail](https://discourse.cmake.org/user_avatar/discourse.cmake.org/betsy.mcphail/32/299_2.png) [@betsy.mcphail](https://discourse.cmake.org/u/betsy.mcphail)\
**Post date:** [May 10, 2023, 1:27pm UTC](https://discourse.cmake.org/t/tutorial-step2/8094/3 "2023-05-10T13:27:39Z")

</div>

It seems like you may be looking at the tutorial instructions for _latest_ but the source files on _master_. For example, [TODO 8 in the instructions on master](https://cmake.org/cmake/help/git-master/guide/tutorial/Adding%20a%20Library.html#cmakelists-txt-use-mymath) matches TODO 8 in the code on master: [Step2/MathFunctions/CMakeLists](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Help/guide/tutorial/Step2/MathFunctions/CMakeLists.txt). As you noticed, we’ve made quite a few improvements to the tutorial recently, I would suggest using the version on master.

---

<div class="post-metadata">

**Author:** ![HardoMX](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hardomx/32/3425_2.png) [@HardoMX](https://discourse.cmake.org/u/HardoMX)\
**Post date:** [May 11, 2023, 7:03am UTC](https://discourse.cmake.org/t/tutorial-step2/8094/4 "2023-05-11T07:03:17Z")

</div>

i have been following the tutorial on the [cmake.org](http://cmake.org) website, is this not up to date? But yes, now I noticed the .rst files in github, thanks!

---

<div class="post-metadata">

**Author:** ![betsy.mcphail](https://discourse.cmake.org/user_avatar/discourse.cmake.org/betsy.mcphail/32/299_2.png) [@betsy.mcphail](https://discourse.cmake.org/u/betsy.mcphail)\
**Post date:** [May 11, 2023, 1:19pm UTC](https://discourse.cmake.org/t/tutorial-step2/8094/5 "2023-05-11T13:19:44Z")

</div>

There are multiple versions of the documentation available online. By default, latest-release ([https://cmake.org/cmake/help/latest/guide/tutorial/index.html](https://cmake.org/cmake/help/latest/guide/tutorial/index.html)) is shown but there is a drop-down box in the top left you can use to select a different version or git-master ([https://cmake.org/cmake/help/git-master/guide/tutorial/index.html](https://cmake.org/cmake/help/git-master/guide/tutorial/index.html)). The .rst files themselves won’t be that helpful as the code snippets are just markdown.
