C++ #在Biicode(Biicode.conf)中包含语句映射
我想为依赖项管理器创建一个块。我不想接触现有的源代码,所以我必须将现有Bii块的包含路径映射到源代码中使用的路径 我在我的现有代码中使用以下内容:C++ #在Biicode(Biicode.conf)中包含语句映射,c++,include,dependencies,dependency-management,biicode,C++,Include,Dependencies,Dependency Management,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/uncopya
#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"
如果我更换了include,一切正常。但正如我已经说过的,我不希望这样丑陋的include路径,而是使用常识(就像Boost和其他库所做的那样)
因此,我确实需要映射路径。我读过并偶然发现了[包含]
部分
我尝试了以下方法:
[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
-语句一起工作?这必须起作用,否则它将是一个致命的标准…如果左侧模式与文件名匹配,[includes]部分将右侧部分前置到左侧。在您的情况下,不需要最后的文件夹。请尝试:
[includes]
gtest/gtest.h: google/gtest/include
fw/core/uncopyable_mixin.h: florianwolters/uncopyable-mixin/include
此外,请记住,您还可以使用模式(ala fnmatch):
[includes]
gtest/*.h: google/gtest/include
fw/core/*.h: florianwolters/uncopyable-mixin/include