Skip to main content
Associate
October 1, 2025
Solved

Bundles and compiler not found if relocating CMAKE_BINARY_DIR

  • October 1, 2025
  • 2 replies
  • 269 views

I'm using CMake presets to setup a bunch of variables (ccache launcher, build type, toolchainfile, binaryDir).

 

My binaryDir is outside of source tree:

"${sourceParentDir}/build/${sourceDirName}/${presetName}"

And vscode configure fails to find arm-none-eabi-gcc, it seems that the process seeks the .settings/bundles.store.json to find the correct gnu-tools-for-stm32 but it fails since it look up cmake binary dir instead of cmake source dir.

 

Copying my .settings directory does fix it, but I have multiple projects lying on the same place and I don't want to mix their settings.

 

Is this an intended behavior or should the .settings files be searched in source dir instead ?

 

Thanks

Best answer by Julien D

@stephane0 Thank for this valuable feedback.

Yes having the CMake binaryDir inside the project tree is a constraint we have.

Similarly you must open a folder which contains the top CMakeLists.txt file of your project as another hard constraint.

Such may evolve in the future however as per of today we don't have other option.

2 replies

Julien D
Julien DBest answer
ST Employee
October 1, 2025

@stephane0 Thank for this valuable feedback.

Yes having the CMake binaryDir inside the project tree is a constraint we have.

Similarly you must open a folder which contains the top CMakeLists.txt file of your project as another hard constraint.

Such may evolve in the future however as per of today we don't have other option.

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.
stephane0Author
Associate
October 1, 2025

Ok @Julien D , thanks for the clarification.