# Add CMAKE\_CTEST\_WORKING\_DIRECTORY variable

**URL:** https://discourse.cmake.org/t/add-cmake-ctest-working-directory-variable/3999
**Category:** Development
**Created:** [August 31, 2021, 7:44am UTC](https://discourse.cmake.org/t/add-cmake-ctest-working-directory-variable/3999 "2021-08-31T07:44:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)
#### Post date: [August 31, 2021, 7:44am UTC](https://discourse.cmake.org/t/add-cmake-ctest-working-directory-variable/3999/1 "2021-08-31T07:44:55Z")

</div>

There is the test property WORKING\_DIRECTORY.  
But unlike most other properties, you cannot change the default.  
The default is always the directory, where add\_test() was called.

I would like to change the default to CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY.  
Maybe this should even be the implicit default, if it is set?

---

<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: [August 31, 2021, 2:30pm UTC](https://discourse.cmake.org/t/add-cmake-ctest-working-directory-variable/3999/2 "2021-08-31T14:30:58Z")

</div>

AFAIK, test properties do not have any initialization from local variables today. `CMAKE_CTEST_` seems like a suitable prefix for such things to me, but wider discussion would be warranted before doing that.

> [@KUGA2](#):
>
> Maybe this should even be the implicit default, if it is set?

Not without a policy and it doesn’t seem like something warranting such a drastic change given how long the current default has existed and may disrupt existing codebases unnecessarily.
