Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Multiple build configurations for CMake Core build projects

Hi Martin,

Here is my analysis of why duplicated launch configurations of a project referring to the same buildconfig.

Let's say I have a project "Hello World" and launch configuration is called "Hello World"

Clicking on the “Duplicate” from the Edit configuration dialog, the new launch configuration getting created (let's say - "Hello World(1))

https://github.com/eclipse-cdt/cdt/blob/7c6bd5bdcb4cf8c31050aeeb102250a27a157728/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java#L142


As the launch configuration changed in the toolbar(Hello World(1)), the below code is getting trigged since there is no change to the Toolchain it will return the existing buildconfig

https://github.com/eclipse-cdt/cdt/blob/7c6bd5bdcb4cf8c31050aeeb102250a27a157728/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchBarTracker.java#L129


Even with the new launch configuration(Hello World(1)) old buildconfig is returned here - actually there is no buildconfig created previous step.

https://github.com/eclipse-cdt/cdt/blob/main/cmake/org.eclipse.cdt.cmake.ui/src/org/eclipse/cdt/cmake/ui/internal/CMakeBuildTab.java#L154


Hence, changing one property of a build configuration(for example, if I add -DCMAKE_BUILD_TYPE=Debug in the additional CMake arguments) ) in the "Hello World" launch configuration will also reflect in the "Hello World(1)" launch configuration as both are referring to the same buildconfig


Thanks!


On Sat, Dec 3, 2022 at 5:57 AM Kondal Kolipaka <kondal.kolipaka@xxxxxxxxx> wrote:
Hi Martin,

File > New > C/C++ Project > CMake Project 

image.png

On Sat, Dec 3, 2022 at 1:25 AM Martin Weber <fifteenknots505@xxxxxxxxx> wrote:
Am Freitag, 2. Dezember 2022, 15:57:38 CET schrieb Kondal Kolipaka:
> Hi Folks,
>
> Is there any way to handle multiple build
> configurations(Debug/Release/Custom) for CMake Core build projects?
>
> New CMake "Build Settings" tab allows us to configure specific CMake
> arguments(Additional CMake arguments, Build command, etc), and allow us
> "duplicate" and create a new configuration. However, everything is getting

Which settings tab are you referring to? I can only find CMake property page
in the project properties that show a 'Launch CMake GUI' button.


--
Cd wrttn wtht vwls s mch trsr.




_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top