# when to use include on core functions?

**URL:** https://discourse.cmake.org/t/when-to-use-include-on-core-functions/1224
**Category:** Usage
**Created:** [May 15, 2020, 10:04am UTC](https://discourse.cmake.org/t/when-to-use-include-on-core-functions/1224 "2020-05-15T10:04:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hex](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hex/32/363_2.png) [@hex](https://discourse.cmake.org/u/hex)
#### Post date: [May 15, 2020, 10:04am UTC](https://discourse.cmake.org/t/when-to-use-include-on-core-functions/1224/1 "2020-05-15T10:04:20Z")

</div>

CMake offers some functions to use without any includes:

- project
- add\_executable
- …

some other functions require an include before being used:

- [`add_file_dependencies`](https://cmake.org/cmake/help/latest/module/AddFileDependencies.html).
- [`cmake_print_properties`](https://cmake.org/cmake/help/latest/module/CMakePrintHelpers.html)
- …

is there any indication on when a module must be included prior to using a function and when not?

P.S.: on further inspection it seems that everything documented under [Documentation » cmake-modules](https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html) requires an include, everything else does not. Is that correct?

---

<div class="post-metadata">

### Author: ![fenrir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenrir/32/734_2.png) [@fenrir](https://discourse.cmake.org/u/fenrir)
#### Post date: [May 15, 2020, 10:33am UTC](https://discourse.cmake.org/t/when-to-use-include-on-core-functions/1224/2 "2020-05-15T10:33:05Z")

</div>

I’d probably say the other way around: everything listed under [https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html](https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html) is a built-in, everything else comes from modules.
