2025-12-01 11:33 AM
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.
Solved! Go to Solution.
2025-12-02 12:18 AM
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.
2025-12-02 12:18 AM
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.