# Please update CMake tutorial code

**URL:** https://discourse.cmake.org/t/please-update-cmake-tutorial-code/6423
**Category:** Site Feedback
**Created:** [September 6, 2022, 3:30pm UTC](https://discourse.cmake.org/t/please-update-cmake-tutorial-code/6423 "2022-09-06T15:30:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Blazing\_Helios](https://discourse.cmake.org/user_avatar/discourse.cmake.org/blazing_helios/32/2746_2.png) [@Blazing\_Helios](https://discourse.cmake.org/u/Blazing_Helios)
#### Post date: [September 6, 2022, 3:30pm UTC](https://discourse.cmake.org/t/please-update-cmake-tutorial-code/6423/1 "2022-09-06T15:30:09Z")

</div>

Hi,

When trying CMake tutorial, Code for Step 4 needs update. Please refer to here for possible update [CMake tutorial Step 4 install example is not working as expected - Stack Overflow](https://stackoverflow.com/questions/73623915/cmake-tutorial-step-4-install-example-is-not-working-as-expected)

Thanks  
Surya

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [September 6, 2022, 3:42pm UTC](https://discourse.cmake.org/t/please-update-cmake-tutorial-code/6423/2 "2022-09-06T15:42:43Z")

</div>

See vre’s answer on SO:

> Your cmake is too old for the `--install` command syntax. `--install` was added to CMake in version 3.15 so you need to install a newer version

---

<div class="post-metadata">

### Author: ![Blazing\_Helios](https://discourse.cmake.org/user_avatar/discourse.cmake.org/blazing_helios/32/2746_2.png) [@Blazing\_Helios](https://discourse.cmake.org/u/Blazing_Helios)
#### Post date: [September 6, 2022, 3:50pm UTC](https://discourse.cmake.org/t/please-update-cmake-tutorial-code/6423/3 "2022-09-06T15:50:33Z")

</div>

Thats right. I resolved the issue. What I’m saying is tutorial code for Step 4 needs to be updated.

This line:

cmake\_minimum\_required(VERSION 3.10)

needs to be changed to:

cmake\_minimum\_required(VERSION 3.15)

?

Thanks for the great tool

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [September 6, 2022, 4:13pm UTC](https://discourse.cmake.org/t/please-update-cmake-tutorial-code/6423/4 "2022-09-06T16:13:25Z")

</div>

Well, the code in the `CMakeLists.txt` file itself works fine with 3.10. It is only the command-line interface described in the tutorial that requires 3.15+. The tutorial step 4 text already says:

> Then run the install step by using the `install` option of the [`cmake`](https://cmake.org/cmake/help/latest/manual/cmake.1.html#manual:cmake(1)) command ( **introduced in 3.15, older versions of CMake must use `make install`** ) from the command line.
