[CMake] Set CMAKE_TOOLCHAIN_FILE from cmake-gui

Roland Waltersson rolles.dump at gmail.com
Tue May 26 05:01:42 EDT 2009


Hi,
I am trying to get a user to choose target from cmake-gui, with:

SET(TARGET "x86" CACHE STRING "Target (x86 or arm)")
#some code here to construct CMAKE_TOOLCHAIN_FILE from TARGET variable

This however don't work as the compiler settings are initialized when
cmake-gui starts, not when the user presses Generate. So changing TARGET
won't have any effect, except by chaning its default value.

I have solved this now by instead using an .sh file to invoke cmake, but I
would really like to be able to change this via cmake-gui. Is it even
possible? thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090526/508bbf26/attachment.htm>


More information about the CMake mailing list