I have a very simple script:
cmake_minimum_required(VERSION 4.0 FATAL_ERROR)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "d0edc3af-4c50-42ea-a356-e2862fe7a444")
set(CMAKE_CXX_MODULE_STD 1)
project(import_std LANGUAGES CXX)
add_executable(main)
target_sources(main PRIVATE main.cpp)
target_compile_features(main PRIVATE cxx_std_23 INTERFACE cxx_std_23)
But cmake seems to never actually enable the flag:
Experimental `import std` support not enabled when detecting toolchain; it must be set before `CXX` is enabled (usually a `project()` call)
Nothing really seems to let me get around this.
For context I'm using clang for compilation and lld for linking.
As Tsyvarev pointed out, i had simply used the wrong UUID, the UUID at main is not the same as the UUID of the latest release, i simply had to look in the v4.0.2 tag.