【发布时间】:2012-05-19 23:10:20
【问题描述】:
IF(UNIX)
# CROSS COMPILATION! ON/OFF
#SET(CMAKE_C_COMPILER /home/username/projects/buildroot/output/host/usr/bin/arm-linux-gcc)
#SET(CMAKE_CXX_COMPILER /home/username/projects/buildroot/output/host/usr/bin/arm-linux-g++)
#SET(CMAKE_C_COMPILER /home/username/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc)
#SET(CMAKE_CXX_COMPILER /home/username/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-g++)
这是我现在为交叉编译所做的。我想添加选项来运行它:
make CROSS_COMPILE=~/projects/buildroot/output/host/usr/bin/arm-linux-
如果我不使用 CROSS_COMPILE 进行制作(而不是 cmake),它必须使用系统默认值,因此 cmake 必须将此选项传递给 makefile。我怎样才能做到?
【问题讨论】:
标签: makefile cmake cross-compiling cmakelists-options