A simple tool to deal with circular dependencies in C/C++.
Follow the steps below:
- Clone this git repository
git clone https://github.com/nelimeee/circinc.git
-
Execute the
cppan
tool or edit the CMakeList.txt to link the dependencies. See sections cppan and Requirements for more explanations on the step. -
Compile the tool
mkdir build
cd build
cmake ..
make
- (Optional) Add the generated executable to your path.
The circinc tool needs
- A C++11 compiler
- CMake >= 3.2
- The following libraries:
If you don't have cppan
on your machine, you need to edit the CMakeList.txt to link by yourself all these libraries.
The C++ Archive Network tool is used to manage libraries. All the documentation is available on the previous link.
To update the libraries, just type:
cd circinc_directory
cppan
You can list all the available options with --help
:
circinc --help
Allowed options:
Generic options:
-h [ --help ] Produce help message.
-v [ --version ] Output the version and exit.
Configuration:
-I [ --include-directory ] arg (=[current directory])
Directories that will be searched for
user #included files.
--sysinclude-directory arg (=[current directory])
Directories that will be searched for
system #included files.
Output the version and exit.
circinc -v
CircInc 0.1 build with:
boost::wave 2.3.2
boost::program_options 2
boost::filesystem 3
boost::graph Last version available
Search for circular #includes in a project.
circinc -I [project_path]/src \ # Add src/ in the search path
--include-directories [personnal_headers] \ # Add [personnal_header] in the search path
--sysinclude-directories usr/include/c++/7.2.0 \ # Add usr/include/c++/7.2.0 in the system search path
[project_path]/main.cpp # Entry point of the project