CMake:指定构建工具链 [英] CMake: specifying build toolchain
问题描述
CMake非常新,到目前为止,我发现它非常有帮助。我有一套自定义库,我想使用交叉编译为多个平台构建。安装工具链,我可以手工创建 Makefile
,我需要这样做,但我想能够使用CMake。
有没有办法告诉 www.vtk.org/Wiki/CMake_Cross_Compiling\">在这里:基本上,你定义一个工具链文件,设置的东西像系统名称,路径编译器等。然后调用 Very new to CMake, and so far I'm finding it to be extremely helpful. I have a set of custom libraries that I would like to build for multiple platforms using cross-compilation. The toolchains are installed, and I can hand-create the Is there a way to tell Have a look here: basically, you define a "toolchain file" that sets things like the system name, paths to compilers and so on. You then call
这篇关于CMake:指定构建工具链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! cmake
哪个工具链要使用,无论是在命令行还是在
cmake
:
cmake / path / src -DCMAKE_TOOLCHAIN_FILE = / path / to / toolchain / foo-bar-baz.cmake
Makefile
s that I need to do so, but I would like to be able to make use of CMake.cmake
which toolchain to use, either at the command line or in the CMakeLists.txt
file?cmake
like so:cmake /path/to/src -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain/foo-bar-baz.cmake