Hi,

> Am 17.12.2018 um 21:18 schrieb Kyle Edwards via cmake-developers 
> <cmake-developers@cmake.org>:
> 
> Then, executables and libraries could have a toolchain specified:
> 
> add_executable(BuildUtility TOOLCHAIN DEFAULT ...)
> add_library(MyLibrary TOOLCHAIN CrossToolchain …)

or even toolchains:

    add_library(feature1 TOOLCHAINS CrossToolChain HostToolChain)

    add_executable(Firmware TOOLCHAIN CrossToolChain)
    target_link_libraries(Firmware feature1)

    add_executable(Test_Feature1 TOOLCHAIN HostToolChain)
    target_link_libraries(Test_Feature1 feature1)

A nice feature would be to let toolchain propagate along the dependency graph 
defined by `target_link_libraries`. So in the example above, the TOOLCHAINS 
option to `add_library` would be optional, because the target Firmware requires 
feature1 to be build with CrossToolChain and Test_Feature1 to be build with 
HostToolChain. Which requires the build to have different binary directories 
for every toolchain. (Which for me is an indication that having 
multidimensional build types would be the more natural way to go)

What I’m still missing is support to define dependencies between different 
targets (build by different toolchains), so that I can describe that I require 
a tool that is build with the HostToolChain, to generate a file that is 
required by the part of the build, that is using the CrossToolChain. And, of 
cause, if the source of that tool changes, that tool have to be rebuild and the 
generated file from the CrossToolChain part of the build have to be rebuild.

best regards,

Torsten

Attachment: signature.asc
Description: Message signed with OpenPGP

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to