Target requires "CXX26" but CMake does not know the flags to enable it

I want to test c++26 with import std; too

if(FMT_MODULE)
    add_library(fmt-module)
    add_library(fmt::fmt-module ALIAS fmt-module)
    target_compile_options(
        fmt-module
        PUBLIC $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>
    )

    if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND ${CMAKE_CXX_STANDARD} EQUAL 26)
        target_compile_features(fmt-module PUBLIC cxx_std_23)
        target_compile_options(fmt-module PUBLIC /std:c++latest)
    else()
        # XXX target_compile_features(fmt-module PUBLIC cxx_std_26)
        target_compile_features(fmt-module PUBLIC cxx_std_${CMAKE_CXX_STANDARD})
    endif()

# ...

But windows preset fails to configure:

Preset CMake variables:

  CMAKE_BUILD_TYPE="Release"
  CMAKE_CXX_COMPILER="cl"
  CMAKE_CXX_EXTENSIONS:BOOL="FALSE"
  CMAKE_CXX_FLAGS_RELEASE="/W3 /permissive- /volatile:iso /Zc:inline /Zc:preprocessor /Zc:enumTypes /Zc:lambda /Zc:__cplusplus /Zc:externConstexpr /Zc:throwingNew /EHsc"
  CMAKE_CXX_SCAN_FOR_MODULES:BOOL="TRUE"
  CMAKE_CXX_STANDARD="26"
  CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE"
  CMAKE_EXPORT_COMPILE_COMMANDS:BOOL="TRUE"
  CMAKE_INSTALL_PREFIX:PATH="D:/a/fmt-module/fmt-module/stagedir"
  CMAKE_MESSAGE_LOG_LEVEL="VERBOSE"
  CMAKE_PREFIX_PATH:STRING="D:/a/fmt-module/fmt-module/stagedir"
  CMAKE_VERIFY_INTERFACE_HEADER_SETS:BOOL="TRUE"
  FMT_DEVELOPER_MODE:BOOL="TRUE"

-- use ccache
-- The CXX compiler identification is MSVC 19.51.36248.0
-- Detecting CXX compiler ABI info
CMake Error in D:/a/fmt-module/fmt-module/build/CMakeFiles/CMakeScratch/TryCompile-hqbuux/CMakeLists.txt:
  Target "cmTC_91db6" requires the language dialect "CXX26" .  But the
  current compiler "MSVC" does not support this, or CMake does not know the
  flags to enable it.


CMake Error at C:/hostedtoolcache/windows/Python/3.14.6/x64/Lib/site-packages/cmake/data/share/cmake-4.4/Modules/CMakeDetermineCompilerABI.cmake:123 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  C:/hostedtoolcache/windows/Python/3.14.6/x64/Lib/site-packages/cmake/data/share/cmake-4.4/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:13 (project)


-- Configuring incomplete, errors occurred!
Error: Process completed with exit code 1.

I found a workaround: