# CMake 4.2.0-rc1 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-4-2-0-rc1-is-ready-for-testing/15251
**Category:** Announcements
**Created:** [October 16, 2025, 10:59pm UTC](https://discourse.cmake.org/t/cmake-4-2-0-rc1-is-ready-for-testing/15251 "2025-10-16T22:59:24Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![david-fong](https://discourse.cmake.org/user_avatar/discourse.cmake.org/david-fong/32/2388_2.png) [@david-fong](https://discourse.cmake.org/u/david-fong)
#### Post date: [October 18, 2025, 9:52am UTC](https://discourse.cmake.org/t/cmake-4-2-0-rc1-is-ready-for-testing/15251/2 "2025-10-18T09:52:04Z")

</div>

Thanks to everyone involved for your work! I have some questions/comments:

> [@johnwparent](#):
>
> CMake now supports Cross Compiling for Emscripten with simple  
> toolchain files.

If I have something like the following in my CMakePresets.json, do I need to (or might I want to) change anything about it once I’m using CMake 4.2?

```json
{
	"name": "tool:emscripten",
	"hidden": true,
	"description": "available if you set/export EMSDK environment variable. good for IDEs which are hard to configure to use `emcmake cmake`.",
	"condition": {"type": "notEquals", "lhs": "$env{EMSDK}", "rhs": ""},
	"toolchainFile": "$env{EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake",

```

* * *

> [@johnwparent](#):
>
> The “ExternalProject” module’s “ExternalProject\_Add()” and  
> “ExternalProject\_Add\_Step()” commands now provide options to set  
> environment variables on the configure, build, install, and test  
> steps.

If I have an external project that also uses CMake, and the main project gets environment variables from a CMake preset (and I rely on build, install, test, etc. to inherit from the configure preset), what would I need to do to have the external project get the same environment variables? Do I just do nothing, or do I need to manually forward the values for each of configure, build, install, and test?

* * *

> [@johnwparent](#):
>
> The “$CONFIG:cfgs” generator expression no longer matches multiple  
> configurations. See policy “CMP0199”.

Some escaping here is missing 🙂 and I got a minor scare before reading what the actual change is in [https://cmake.org/cmake/help/latest/policy/CMP0199.html](https://cmake.org/cmake/help/latest/policy/CMP0199.html). Much narrower than it sounds here and in the release notes. Maybe a little bit of elaboration could save some other readers from a similar scare?

* * *

Out of curiosity, is there an anticipated non-rc release date for CMake 4.2?

---

_[View the full topic](https://discourse.cmake.org/t/cmake-4-2-0-rc1-is-ready-for-testing/15251)._
