# CMake Generator Error for Unix Makefiles - Would like a Solution.

**URL:** <https://discourse.cmake.org/t/cmake-generator-error-for-unix-makefiles-would-like-a-solution/1385>\
**Category:** Usage\
**Created:** [June 12, 2020, 8:50pm UTC](https://discourse.cmake.org/t/cmake-generator-error-for-unix-makefiles-would-like-a-solution/1385 "2020-06-12T20:50:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [June 14, 2020, 2:18am UTC](https://discourse.cmake.org/t/cmake-generator-error-for-unix-makefiles-would-like-a-solution/1385/7 "2020-06-14T02:18:53Z")

</div>

CMake’s `include_directories()` command does that (as does `target_include_directories` which is the preferred one). However, the value must be known when CMake runs; you cannot defer expansion of the variable until build time.

---

_[View the full topic](https://discourse.cmake.org/t/cmake-generator-error-for-unix-makefiles-would-like-a-solution/1385)._
