cancel
Showing results for 
Search instead for 
Did you mean: 

Headless build: always building after clean

KR51K
Associate III

Hello, for static code analysis I need the output from the clean/build process. So I searched how to build my project via command line and found the headless-build.bat (I use windows 10). After some problems with the syntax I finally got it running. The only problem is, that when I want to clean the project (-clean), it automatically builds the project afterwards. I didn’t find anything how to stop this process after cleaning - do you have any idea?

Thanks and best regards

1 ACCEPTED SOLUTION

Accepted Solutions
KR51K
Associate III

Hello, thanks for your answer. I found a solution to omiut the first step of cleaning in my tool, so I'm fine with using the clean build as the second build step. But it's good to know the reason!

Thanks and best regards!

View solution in original post

2 REPLIES 2
Markus GIRDLAND
ST Employee

Hello COste!

This use case is not supported as of today and the issue is upstream in Eclipse. "Clean" does two different things depending on if it's used "inside" CubeIDE or if you run the command through headless build.

  • Inside CubeIDE: clean runs "rm -rf"
    • CubeIDE removes everything in the "Debug" or "Release" folder depending on which one is active
  • Headless: CubeIDE runs both clean and build
    • CubeIDE removes everything and then rebuilds

What's the specific use case for your static code analysis? Does this block you?

KR51K
Associate III

Hello, thanks for your answer. I found a solution to omiut the first step of cleaning in my tool, so I'm fine with using the clean build as the second build step. But it's good to know the reason!

Thanks and best regards!