cancel
Showing results for 
Search instead for 
Did you mean: 

Bundles and compiler not found if relocating CMAKE_BINARY_DIR

stephane0
Associate II

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

2 REPLIES 2
Julien D
ST Employee

@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.

stephane0
Associate II

Ok @Julien D , thanks for the clarification.