cancel
Showing results for 
Search instead for 
Did you mean: 

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

maxhalanen
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Julien D
ST Employee

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.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Julien D
ST Employee

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.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.