The trace section of CMake configurePresets has no effect?

I have this CMakePresets.jsonfile

{
  "version": 8,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 28,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "cmake-pedantic",
      "hidden": true,
      "warnings": {
        "dev": true,
        "deprecated": true,
        "uninitialized": true,
        "unusedCli": true,
        "systemVars": false
      },
      "trace": {
        "mode": "expand",
        "source": [
            "CMakeDetermineCompilerSupport.cmake",
            "CMakeDetermineCompilerId.cmake",
            "Clang-CXX-CXXImportStd.cmake"
        ]
      },
      "errors": {
        "dev": false,
        "deprecated": false
      }
    },
    {
      "name": "dev-mode",
      "hidden": true,
      "inherits": "cmake-pedantic",
      "installDir": "${sourceDir}/stagedir",
      "cacheVariables": {
        "CMAKE_PREFIX_PATH": {
          "type": "path",
          "value": "${sourceDir}/stagedir"
        },
        "CMAKE_EXPORT_COMPILE_COMMANDS": true,
        "CMAKE_MESSAGE_LOG_LEVEL": "VERBOSE",
        "CMAKE_VERIFY_INTERFACE_HEADER_SETS": true,
        "cmake-init-modules_DEVELOPER_MODE": true
      }
    },

    # ...

    ]
}

Every of my used presets is inherited from dev-mode.

But I see no traces?

bash-5.3$ CXX=clang++ cmake --preset dev --log-level=TRACE --fresh
Preset CMake variables:

  BUILD_MCSS_DOCS:BOOL="FALSE"

  BUILD_SHARED_LIBS:BOOL="TRUE"
  CMAKE_BUILD_TYPE="Debug"
  CMAKE_CXX_EXTENSIONS:BOOL="TRUE"
  CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wformat=2 -Wno-undef -Werror=float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wimplicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast"
  CMAKE_CXX_STANDARD="23"
  CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE"
  CMAKE_EXPORT_COMPILE_COMMANDS:BOOL="TRUE"
  CMAKE_INSTALL_PREFIX:PATH="/Users/clausklein/Workspace/cpp/cxx20/cmake-init-modules/stagedir"
  CMAKE_MESSAGE_LOG_LEVEL="VERBOSE"
  CMAKE_PREFIX_PATH:STRING="/Users/clausklein/Workspace/cpp/cxx20/cmake-init-modules/stagedir"
  CMAKE_VERIFY_INTERFACE_HEADER_SETS:BOOL="TRUE"
  cmake-init-modules_DEVELOPER_MODE:BOOL="TRUE"

Preset environment variables:

  CPM_USE_LOCAL_PACKAGES="OFF"

-- CXXFLAGS=-stdlib=libc++
'brew' '--prefix' 'llvm'
-- LLVM_PATH=/usr/local/Cellar/llvm/21.1.3_1
-- The CXX compiler identification is Clang 21.1.3
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Cellar/llvm/21.1.3_1/bin/clang++ - skipped
-- Detecting CXX compile features
CMake Warning (dev) at /Users/clausklein/.local/share/cmake-4.2/Modules/Compiler/CMakeCommonCompilerMacros.cmake:248 (cmake_language):
  CMake's support for `import std;` in C++23 and newer is experimental.  It
  is meant only for experimentation and feedback to CMake developers.
Call Stack (most recent call first):
  /Users/clausklein/.local/share/cmake-4.2/Modules/CMakeDetermineCompilerSupport.cmake:113 (cmake_create_cxx_import_std)
  /Users/clausklein/.local/share/cmake-4.2/Modules/CMakeTestCXXCompiler.cmake:83 (CMAKE_DETERMINE_COMPILER_SUPPORT)
  CMakeLists.txt:5 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Detecting CXX compile features - done
-- CMAKE_CXX_STDLIB_MODULES_JSON=/usr/local/Cellar/llvm/21.1.3_1/lib/c++/libc++.modules.json
-- CMAKE_CXX_COMPILER_IMPORT_STD=23;26
-- CMAKE_CXX_MODULE_STD=ON
-- ALGO_USE_MODULES=ON
-- CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=/usr/local/Cellar/llvm/21.1.3_1/include/c++/v1;/usr/local/Cellar/llvm/21.1.3_1/lib/clang/21/include;/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include

# ...

bash-5.3$ cmake --version
cmake version 4.2.0-rc1-g4b5233e

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Configure Presets are just a convenient way of specifying a bunch of command-line arguments to cmake at configure time. Do you see the expected trace output if you build the command-line manually and run it?

Yes, but I have to set all the trace parameters at command line again?

I looked at the source code for latest cmake and it seems straightforward enough that if the trace settings are set in the preset it applies them to the cmake object before operating.

Try creating the smallest repro you can on a “hello world” CMakeLists.txt

I found the problem:

The trace section of presets is not transitive!