Skip to main content
Explorer II
December 1, 2025
Solved

Does cube-cmake packaged with the VSCode extension run cmake version 4.0.1?

  • December 1, 2025
  • 1 reply
  • 149 views

I noticed that running cube-cmake --version reports cmake version 4.0.1, but running the actual build commands with cmake 4.0.1 produces a different binary than when running with cube-cmake.

Is it safe to build a binary for release using cmake instead of cube-cmake? My program seems to run just fine building with cmake but I am curious what the difference between the two is.

    This topic has been closed for replies.
    Best answer by Julien D

    cube-cmake is a very basic wrapper on top of the cube cmake command, itself loading the cube environment defined in your project settings before invoking the cmake binary from Kitware.

    If you ensure using the exact same build environment you can absolutely use cmake directly to produce your binary, and it should be the same.

    You can use this command to view the underneath PATH environment:

     
    cube [--json] --resolve cmake​

     

    Then you could ask yourself why we need the intermediate cube-cmake, why ST doesn't rely directly on cube cmake, or even cmake.

    cube cmake is there to ease environment loading and reproducibility across computers/developers by not depending on third-party softwares installed locally. Also Interesting for CI/CD.

    cube-cmake is there to enable smooth integration in VSCode and its popular CMake Tools. Because of public APIs / settings STMicroelectronics can't configure its cube cmake command in CMake Tools; the extension requires a single binary to work while we would like to set binary+command. Reason why we had to introduce this utility which at this time does nothing more than spawning immediately cube cmake.

    1 reply

    Julien DAnswer
    ST Employee
    December 2, 2025

    cube-cmake is a very basic wrapper on top of the cube cmake command, itself loading the cube environment defined in your project settings before invoking the cmake binary from Kitware.

    If you ensure using the exact same build environment you can absolutely use cmake directly to produce your binary, and it should be the same.

    You can use this command to view the underneath PATH environment:

     
    cube [--json] --resolve cmake​

     

    Then you could ask yourself why we need the intermediate cube-cmake, why ST doesn't rely directly on cube cmake, or even cmake.

    cube cmake is there to ease environment loading and reproducibility across computers/developers by not depending on third-party softwares installed locally. Also Interesting for CI/CD.

    cube-cmake is there to enable smooth integration in VSCode and its popular CMake Tools. Because of public APIs / settings STMicroelectronics can't configure its cube cmake command in CMake Tools; the extension requires a single binary to work while we would like to set binary+command. Reason why we had to introduce this utility which at this time does nothing more than spawning immediately cube cmake.