I am trying to use biicode to manager dependencies for my project so that I can automate things like boost or sqlite and use travis-ci
From what I understand bii is expecting your source files to be at the root folder of your block like mentionned in their tutorials:
|-- my_project
| +-- bii
| +-- bin
| +-- blocks
| | +-- myuser
| | | +-- my_block
| | | | |-- main.cpp
| | | | |-- biicode.conf
But in my case, the source file is like this
|-- my_project
| +-- bii
| +-- bin
| +-- blocks
| | +-- myuser
| | | +-- my_block
| | | | |-- src
| | | | | +--folderA
| | | | | | +--core
| | | | | | |-- various .cpp
| | | | | | +--impl
| | | | | | |-- various .cpp
| | | | | |-- various .cpp
| | | | |-- biicode.conf
and running configuration keep missing these folders
bii cpp:configure
I have read the doc about biicode.conf but it doesn't mention an alternative path for source files.
So my question is, do I really need to put everything as a flat directory where every source file is in the same folder to use biicode ?
EDIT: I forgot to mention that I am trying to build a library (to be used in another bii project), not an executable
You can sort your block like you want inside your blocks/my_user/my_block
. For example, take a look to this block:
Here there is a structure without any pattern.
biicode.conf
, among other things, helps you to tell biicode where your header files (but not source ones) are, thanks to [paths]
section, because the source ones biicode detects them automatically, else you could customize your dependencies with [dependencies]
section.
Making an example with this layout:
|-- my_project
| +-- bii
| +-- bin
| +-- blocks
| | +-- myuser
| | | +-- my_block
| | | | |-- src
| | | | | +--folderA
| | | | | | +--core
| | | | | | |-- core.h
| | | | | | |-- core.cpp
| | | | | | +--impl
| | | | | | |-- impl_ext.h
| | | | | | |-- impl.h
| | | | | | +--src
| | | | | | |-- impl.cpp
| | | | | | |-- impl_ext.cpp
| | | | | |-- CMakeLists.txt
| | | | |-- biicode.conf
| | | | |-- CMakeLists.txt
Then, your .cpp
files might have relative includes like:
#include "core/core.h"
#include "impl/impl.h"
#include "impl/impl_ext.h"
Supposing your CMakeLists.txt files are right, you'd only have to tell biicode where it must search this "relative" headers, so write into the biicode.conf
:
[paths]
folderA/core
folderA/impl
I hope it resolves your doubts! ;)