升级到1.72.0后,Boost构建失败--同一个目标两次。

问题描述 投票:0回答:1

大家好,stackoverflow的大神们。 我的项目通过一个CMake来构建Boost。ExternalProject_Add 命令。 该 b2 构建命令如下。

b2 -j${num_processors} -d 0 --layout=versioned threading=multi architecture=x86 address-model=64 link=shared --with-system --with-thread --with-date_time --with-chrono --with-atomic variant=${config_type} --prefix=${UNRELEVANT_PATH} --stagedir=${UNRELEVANT_PATH} install stage

num_processors, config_typeUNRELEVANT_PATH 是 CMake 变量,用于计算构建机器上的核心数量、构建变量类型和安装路径。 这个命令对于使用gcc 4.8.1和Visual Studio 2015的Boost 1.62是有效的。 我们现在升级到Boost 1.72.0,但在两个编译器上都出现了这个错误。

Performing configuration checks

    - default address-model    : 64-bit
    - default architecture     : x86
    - lockfree boost::atomic_flag : yes
error: Name clash for '<p/my/path/to/boost/lib/cmake/boost_atomic-1.72.0>boost_atomic-config.cmake'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error:     -  none
error:     -  none
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.

我什么都没做,只是把boost的源文件从1.62替换到1.72.0。 我找不到任何相关的差异,在 b2 这些版本之间的文档。 我错过了什么吗?

我试着把 --with-atomic 标志,但在下一个库上却出现了同样的错误。 我已经尝试了不同的选项 --layout, threadingarchitecture 毫无进展。 有什么建议,我应该进一步调查解决吗?

c++ boost cmake
1个回答
0
投票

显然,我一直以来都做错了。 你不应该设置 --prefix--stagedir 到同一个位置。以前迭代的 boost 似乎并不关心这个问题。 后来的一个版本开始关心,导致了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.