【发布时间】:2016-09-08 08:00:39
【问题描述】:
我正在使用 Boost 的 bjam,我正在尝试从同一个 Jamfile 构建同一个库的两个不同版本。需要使用定义的宏来构建库的一个版本以启用特殊功能。我希望在同一个最终位置实现两个不同的名称库。
举例来说,
lib a
: [glob a.cpp]
;
lib a_special
: [glob a.cpp]
: <define>SPECIAL_FUNCTIONALITY
;
问题在于a.o(从a.cpp 生成的目标文件)被生成了两次——每个目标一次。我从 bjam 得到的实际错误是
error: Name clash for '<pbin/gcc-5.2.1/debug/link-static>a.o'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - none
error: - <define>SPECIAL_FUNCTIONALITY
error:
有谁知道让目标的中间文件转到不同位置的方法吗? 谁能想到更好的方法来实现我想要做的事情?
【问题讨论】: