# Experimental \`import std\` support not enabled when detecting toolchain clang-22.1?

**URL:** https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534
**Category:** Development
**Tags:** os:macos, gen:ninja
**Created:** [February 28, 2026, 2:28pm UTC](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534 "2026-02-28T14:28:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [February 28, 2026, 2:28pm UTC](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534/1 "2026-02-28T14:28:11Z")

</div>

```bash
bash-5.3$ ~/.local/bin/cmake --workflow llvm-release --fresh
Executing workflow step 1 of 3: configure preset "llvm-release"

-- CXXFLAGS=-stdlib=libc++
'brew' '--prefix' 'llvm'
-- LLVM_DIR=/usr/local/Cellar/llvm/22.1.0
-- CMAKE_CXX_STDLIB_MODULES_JSON=/usr/local/Cellar/llvm/22.1.0/lib/c++/libc++.modules.json
-- The CXX compiler identification is Clang 22.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Cellar/llvm/22.1.0/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=/usr/local/Cellar/llvm/22.1.0/include/c++/v1;/usr/local/Cellar/llvm/22.1.0/lib/clang/22/include;/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include
-- CMAKE_CXX_STDLIB_MODULES_JSON=/usr/local/Cellar/llvm/22.1.0/lib/c++/libc++.modules.json
-- BEMAN_USE_MODULES=TRUE
-- BEMAN_USE_STD_MODULE=TRUE
-- CMAKE_CXX_COMPILER_IMPORT_STD=23;26
-- CMAKE_CXX_MODULE_STD=ON
-- BEMAN_HAS_IMPORT_STD=ON
-- CMAKE_CXX_SCAN_FOR_MODULES=ON
Compiler is: Clang version: 22.1.0
cmake is: 4.3.0-rc1-gd072d3b modules scan: ON
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
Tests to be built: scope_success;scope_exit;scope_fail;unique_resource;unique_resource_2;module
Examples to be built: scope_example;unique_resource;unique_resource-file;scope-module
-- Configuring done (17.5s)
CMake Error in CMakeLists.txt:
  The "CXX_MODULE_STD" property on target "beman.scope" requires toolchain
  support, but it was not provided. Reason:

    Experimental `import std` support not enabled when detecting toolchain; it must be set before `CXX` is enabled (usually a `project()` call)

CMake Generate step failed. Build files cannot be regenerated correctly.
bash-5.3$ 

```

**Note found**

This support is provided only when experimental support for `import std` has been enabled by the`CMAKE_EXPERIMENTAL_CXX_IMPORT_STD` gate.

I thought the experimental is over?

---

<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: [March 1, 2026, 1:00pm UTC](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534/2 "2026-03-01T13:00:41Z")

</div>

The experimental gate [was put back in place](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/11745) because we found that toolchains do not reliably ship the initialization symbol (see [your issue here](https://gitlab.kitware.com/cmake/cmake/-/issues/27626) for an example). Without this, there are issues with providing it. We’re working with toolchains to determine the next steps.
