# Minimum CMake version for running CMake's own tests

**URL:** https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281
**Category:** Development
**Created:** [May 9, 2021, 4:30am UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281 "2021-05-09T04:30:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [May 9, 2021, 4:30am UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281/1 "2021-05-09T04:30:43Z")

</div>

What is the minimum CMake version (well, really the `ctest` version) that we support for running CMake’s test suite? The main reason I’m asking is that it feels well past time that we allow using test fixtures in CMake’s own tests, but I think the last time I asked about this, we had to support building CMake and running its tests with a version earlier than CMake 3.7 (which is when support for fixtures were added).

An example of where this could be used is in the `RunCMake.ExternalProject` test. At the moment, if you try to use `RunCMake_TEST_FILTER` with that, you still end up with a python server being started up since it is needed by some of those tests. That is a perfect candidate for test fixtures, allowing you to hand over to `ctest` the management of starting and stopping that server only if it is needed. I’m sure there are other cases where test fixtures could be used to enforce more robust and more convenient test dependencies (again, I’ve seen a few relating to ExternalProject’s other tests).

---

<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: [May 9, 2021, 9:28pm UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281/2 "2021-05-09T21:28:09Z")

</div>

I would guess that we’re limited by the version in `CMakeLists.txt` for compiling CMake itself. That appears to be CMake 3.1 right now. Though it’s really a Brad question since I don’t know the makeup of the nightly test machines out there.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [May 10, 2021, 1:08pm UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281/3 "2021-05-10T13:08:12Z")

</div>

We’ve discussed the possibility of bumping CMake’s own `cmake_minimum_required()` to something much more recent, since it can always be bootstrapped anyway. However, we haven’t taken any action on that front yet.

---

<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: [May 10, 2021, 8:01pm UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281/4 "2021-05-10T20:01:29Z")

</div>

I think bumping CMake’s own minimum required version of CMake to 3.7 would be fine.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [May 15, 2021, 11:01am UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281/5 "2021-05-15T11:01:16Z")

</div>

Turns out the changes needed for `RunCMake.ExternalProject` didn’t need test fixtures after all. I’ll hold off bumping the minimum CMake version to 3.7 until I update other tests at some point to need them. That will make the motivation for updating the minimum CMake version clearer.
