# question about the demo showed in cmake-packages(7) documentation

**URL:** https://discourse.cmake.org/t/question-about-the-demo-showed-in-cmake-packages-7-documentation/11314
**Category:** Development
**Created:** [July 24, 2024, 2:42am UTC](https://discourse.cmake.org/t/question-about-the-demo-showed-in-cmake-packages-7-documentation/11314 "2024-07-24T02:42:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Li\_Haohuang](https://discourse.cmake.org/user_avatar/discourse.cmake.org/li_haohuang/32/4771_2.png) [@Li\_Haohuang](https://discourse.cmake.org/u/Li_Haohuang)
#### Post date: [July 24, 2024, 2:42am UTC](https://discourse.cmake.org/t/question-about-the-demo-showed-in-cmake-packages-7-documentation/11314/1 "2024-07-24T02:42:11Z")

</div>

[cmake-packages(7) — CMake 3.30.1 Documentation](https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages)  
The cmake scripts snippet showed in above linking uses cmake command “configure\_file()” to generante configuration file. But in another link [CMakePackageConfigHelpers — CMake 3.30.1 Documentation](https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html), it says we should not use the plain _configure\_file()_ command, I’ve sceenshoted this description in the following picture.

 ![image](https://discourse.cmake.org/uploads/default/original/2X/4/4b73e09617ba4b325da099c029fa8e525d427282.png)

So which rule should I follow? Thanks!

Best wishes!

---

<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: [July 24, 2024, 1:52pm UTC](https://discourse.cmake.org/t/question-about-the-demo-showed-in-cmake-packages-7-documentation/11314/2 "2024-07-24T13:52:35Z")

</div>

The `cmake-packages(7)` manual’s example `ClimbingStatsConfig.cmake` does not suffer from any of the pitfalls that `configure_package_config_file` is meant to address. However, the example could perhaps be updated to use `configure_package_config_file` for completeness.

See also the [Importing and Exporting Guide](https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html#creating-packages)’s section on creating packages.

---

<div class="post-metadata">

### Author: ![Li\_Haohuang](https://discourse.cmake.org/user_avatar/discourse.cmake.org/li_haohuang/32/4771_2.png) [@Li\_Haohuang](https://discourse.cmake.org/u/Li_Haohuang)
#### Post date: [July 25, 2024, 6:16am UTC](https://discourse.cmake.org/t/question-about-the-demo-showed-in-cmake-packages-7-documentation/11314/3 "2024-07-25T06:16:57Z")

</div>

**Thank you very much!**  
I’ve read that _guide_ you provided above which is really helpful! 🤓

So I have another little suggestion, in this page [CMake Reference Documentation — CMake 3.30.1 Documentation](https://cmake.org/cmake/help/latest/index.html) , may we put “GUIDE” section more front, just after “Introduction”? I think “guide” is more fundamental and important to cmake novice!  
I also want to learn your opinion, thanks!

Best wishes!
