Description
CMake projects are not setting cmake -DCMAKE_BUILD_TYPE=... based on the Launch mode in the LaunchBar.
If you switch Launch mode to Debug in the LaunchBar and build you get a binary without debug information, because CFLAG -g was missing. Hitting a breakpoint will show you no code.
To Reproduce
Steps to reproduce the behavior:
- Create a CMake project with hello world example.
- Set Launch mode to Debug.
- Build
- Start debug
The program will break at main, but you see no code.
Expected behavior
You see the code.
Version Information (please complete the following information):
- OS and OS Version/extra details: Linux
- Eclipse Version from Help -> 2024-06 (4.32)
- CDT Version from Help -> 11.6
Additional context
I did some debug.
In CommandDescriptorBuilder.makeCMakeCommandline() a call is done to cmakeProperties.getBuildType() which always returns null.
And this is caused by the fact that the build type was never set. CMakePropertiesBean.setBuildType() is never called.