#include statement mapping in Biicode (biicode.conf)

I want to create a block for the Biicode dependency manager . I don't want to touch on existing source code, so I need to map the inclusion paths from existing Bii blocks to the paths used in my source code.

In my existing code, I use the following options:

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

At default settings, Bii expects the following paths:

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

If I replace include, everything will work as expected. But, as I said, I do not want such ugly ones to include paths, but use common sense (as Boost and other libraries do).

Therefore, I need to map the paths. I read about biicode.conf and came across the [includes] section.

I tried the following:

 [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] 

But this does not work:

 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" 

So my question is: how do I configure the configuration to work with existing #include states? It should work, otherwise it’s a killer criterion ...

+6
source share
1 answer

The [includes] section adds the right side to the left side if the left template matches the file name. In your case, the last folders are not needed. Try instead:

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

Also, remember that you can also use templates (ala fnmatch):

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

Source: https://habr.com/ru/post/980366/


All Articles