# Is \`CMAKE\_ARGS\` ignored if \`CONFIGURE\_COMMANDS\` is used?

**URL:** https://discourse.cmake.org/t/is-cmake-args-ignored-if-configure-commands-is-used/6694
**Category:** Usage
**Created:** [October 19, 2022, 11:28am UTC](https://discourse.cmake.org/t/is-cmake-args-ignored-if-configure-commands-is-used/6694 "2022-10-19T11:28:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dundargoc](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dundargoc/32/1923_2.png) [@dundargoc](https://discourse.cmake.org/u/dundargoc)
#### Post date: [October 19, 2022, 11:28am UTC](https://discourse.cmake.org/t/is-cmake-args-ignored-if-configure-commands-is-used/6694/1 "2022-10-19T11:28:01Z")

</div>

Long story short, I’d like to use both `CONFIGURE_COMMAND` and `CMAKE_ARGS` in an `ExternalProject_Add`. When I move `-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}` from `CONFIGURE_COMMAND` to `CMAKE_ARGS` my build stops working and it seems the `CMAKE_INSTALL_PREFIX` isn’t passed to the project. However, I don’t encounter this problem if I don’t use any `CONFIGURE_COMMAND`. Is this behavior intended?

---

<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: [October 19, 2022, 11:39am UTC](https://discourse.cmake.org/t/is-cmake-args-ignored-if-configure-commands-is-used/6694/2 "2022-10-19T11:39:38Z")

</div>

It’s not written explicitly in the documentation but can be deduced, since `CONFIGURE_COMMAND` is for non-CMake dependencies:

> For non-CMake external projects, the `CONFIGURE_COMMAND` option must be used to override the default configure command ([`generator expressions`](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)) are supported). For projects that require no configure step, specify this option with an empty string as the command to execute.
