[CMake] Implicit toolchain file usage

Laszlo Papp lpapp at kde.org
Thu Jan 17 08:02:09 EST 2013


Hi,

I have been pondering for a while if it was possible (theoritically, and
then practically) to get the toolchain fine defined inside one (main?) of
the cmake files?

I have been using the -DCMAKE_TOOLCHAIN_FILE=my-toolchain-file.cmake
option, but I think this can become duplicated easily. That is because most
of the time the developers, packagers, or users may have to define the
platform to build for on the command line anyway. Hence, the toolchain file
detection and usage could be implicit. I have also imported my toolchain
file into the project because it is a very short file, and really not a big
burden. I understand that the toolchain files are specified by this file,
so this should be put into an early stage of the build procedure for sure.

Otherwise, everyone has to deal with it separately, which is undesirable, I
believe. Sometimes, it may make sense to customize this on your own, but
there could be a fallback provided by the project developers implicitly
inside the build system of the given project. I think, this would be a
great thing to have.

Is it already available now like just simple define (implicit equivalence
of the -D) or so?

Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130117/f9febd86/attachment.htm>


More information about the CMake mailing list