我想为依赖关系管理器Biicode创建一个块。我不希望触及现有的源代码,所以我必须将包含路径从现有的Bii块映射到我的源代码中使用的路径。
我正在使用现有代码中包含的以下内容:
#include "gtest/gtest.h"
#include "fw/core/uncopyable_mixin.h"对于默认设置,Bii需要以下路径:
#include "google/gtest/include/gtest/gtest.h"
#include "florianwolters/include/fw/core/uncopyable_mixin.h"如果我替换了包含,一切都如期而至。但是,正如我已经说过的,我不希望这样丑陋的包含路径,而是使用常识(就像Boost和其他库一样)。
因此,我确实需要绘制路径图。我读过关于biicode.conf的文章,无意中发现了[includes]部分。
我试过以下几种方法:
[requirements]
google/gtest: 9
florianwolters/uncopyable-mixin: 0
[parent]
florianwolters/singleton: -1
[paths]
include
[dependencies]
[mains]
[hooks]
[includes]
gtest/gtest.h: google/gtest/include/gtest
fw/core/uncopyable_mixin.h: florianwolters/uncopyable-mixin/include/fw/core
[data]但这是行不通的:
INFO: Processing changes...
WARN: Removing unused reference to "florianwolters/uncopyable-mixin: 0" from florianwolters/singleton "requirements"
WARN: Removing unused reference to "google/gtest: 9" from florianwolters/singleton "requirements"因此,我的问题是:如何配置映射以使其与现有的#include-statements一起工作?这必须有效,否则它是一个杀手-标准.
发布于 2014-12-31 16:51:40
包含部分将右侧置于左侧,以防左侧模式与文件名匹配。在您的情况下,最后的文件夹是不必要的。试一试:
[includes]
gtest/gtest.h: google/gtest/include
fw/core/uncopyable_mixin.h: florianwolters/uncopyable-mixin/include此外,请记住,您也可以使用模式(ala ):
[includes]
gtest/*.h: google/gtest/include
fw/core/*.h: florianwolters/uncopyable-mixin/includehttps://stackoverflow.com/questions/27720874
复制相似问题