2014-12-31 1 views
6

종속성 관리자 인 블록 Biicode을 만들고 싶습니다. I 은 기존 소스 코드를 터치하지 않으므로 기존 Bii 블록의 포함 경로를 내 소스 코드에 사용 된 경로로 매핑해야합니다. 예상대로 나는이 포함 교체 할 경우#include 문은 Biicode (biicode.conf)에 매핑합니다.

#include "google/gtest/include/gtest/gtest.h" 
#include "florianwolters/include/fw/core/uncopyable_mixin.h" 

, 모든 것이 작동 : BII는 다음 경로가 기대하는 기본 설정으로

#include "gtest/gtest.h" 
#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? 이것은 작동해야하며 그렇지 않으면 킬러 기준입니다 ...

답변

5

[includes] 섹션은 왼쪽 패턴이 파일 이름과 일치 할 경우 왼쪽에 오른쪽 부분을 앞에 둡니다. 귀하의 경우 마지막 폴더는 필요하지 않습니다. 대신보십시오 : 또한

[includes] 
    gtest/gtest.h: google/gtest/include 
    fw/core/uncopyable_mixin.h: florianwolters/uncopyable-mixin/include 

을, 당신은 (fnmatch에서 파생 된 ALA) 또한 패턴을 사용할 수 있음을 기억

[includes] 
    gtest/*.h: google/gtest/include 
    fw/core/*.h: florianwolters/uncopyable-mixin/include