#Cmake, multiple toolchains, howto simple switch
Mário Oravec
moravec at moniro.com
Wed Nov 16 09:34:50 GMT 2016
Hi Leon,
so far I am using the following workaround
in top level CMakeList.txt I put the following targets which are created
for both configurations and right click and build on particular target
does what I want. But would be more beautiful to have some support
in kdevelop
add_custom_target($test-host
WORKING_DIRECTORY top/build/host
# it builds tests
COMMAND make
# it runs tests
COMMAND ./src/test/sb_peripheral_test
COMMENT building tests
)
add_custom_target(app-arm
WORKING_DIRECTORY top/build/app
# it builds app for arm
COMMAND make
COMMENT building target
)
MOr
On Wednesday, November 16, 2016 11:09:44 AM CET Leon Pollak wrote:
> Sorry for possible incorrect understanding...:-)
>
> I work in the very similar case and have, IMHO, more important issue:
> I do not see a big deal in changing the configuration via menu.
Ok
> But, what is much ore annoying for me is the necessity to switch the
> "current launch configuration".
You mean if you set launch and changes configuration let say to target
the correct launch is not preset as prefered? so you will have to again
choose it from menu?
> I think, that it should not be a big issue to make some kind of connection
> between the specific configuration and corresponding target/launch.
>
> Thanks.
>
> On Wednesday 16 November 2016 09:24:46 René J.V. Bertin wrote:
> > On Wednesday November 16 2016 08:37:31 Mário Oravec wrote:
> > >Here is my suggestion how I would like it, if I click on target and
> > >choose
>
> build, kdevelop will
>
> > >change configuration automatically in background before build, but now it
>
> is not possible
>
> > >because kdevelop present just targets of active configuration.
> >
> > That's going to be complicated: not only would the CMake project manager
>
> have to check all build directories for targets, it would also have to
> figure something out if multiple build directories have the same targets
> (say if you have 2 build dirs. configured to compare how 2 different
> compilers deal with the same source code).
>
> > A drop-down or sub menu (in the Project menu) could indeed be nice. But it
>
> would also be very nice if KDevelop didn't forcibly rerun cmake if you
> change build directories and the new one already has a
> compile_commands.json file (i.e. if it wouldn't rerun cmake when you open a
> project configured for that build dir).
>
> > What I find more important though (in terms of priority) is a proper way
> > of
>
> configuring the cmake "extra arguments" (but also the install location and
> build type!!) after you create a project.
>
> > R.
More information about the KDevelop
mailing list