#Cmake, multiple toolchains, howto simple switch

Mário Oravec moravec at moniro.com
Wed Nov 16 07:37:31 GMT 2016


Hi,

I have cmake project where is 
- application target(top/build/app) configured with arm toolchain 
- test target(top/build/tests) configured for host
so in my case build folder contents two subfolders one for app and second for tests, here 
it is folder structure

top
top/build/app
top/build/tests
top/src/app/CMakeLists.txt
top/src/tests/CMakeLists.txt
top/CMakeLists.txt

I configured from console 
top/build/app with arm toolchain
top/build/tests with default host toolchain

in top/CMakeFile I have the following 

if(*CMAKE_CROSSCOMPILING*)
  add_subdirectory(src/app)
else()
  add_subdirectory(src/test)
endif()

Now If I want to compile for app I have to open project configuration and change it to top/
build/app and 
If I want to compile for tests I have to open project configuration again and change it to top/
build/tests.

And as you can see changing it is cumbersome and time consuming, especially if you 
develop by TDD, there is reason to change targets frequently.

*My question is, is it possible to create some shortcut button on toolbar to be able to 
change it by one click?*

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.

Thanks for any meaningfull answer,


Br,
   MOr 


     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20161116/82efca40/attachment.html>


More information about the KDevelop mailing list